2001-08-19 16:51:29 -05:00
|
|
|
#!/bin/sh
|
|
|
|
# This is a very, _very_, simple script to convert the .csv file into a .pot/.po.
|
|
|
|
# Its not clever but it took me 2 minutes to write :)
|
|
|
|
# Michael Twomey <michael.twomey@ireland.sun.com>
|
|
|
|
# 23 March 2001
|
|
|
|
# with slight GnuCash modifications by Christian Stimming <stimming@tuhh.de>
|
|
|
|
# 19 Aug 2001
|
2020-09-04 15:40:49 -05:00
|
|
|
# and 04 Sep 2020 by Frank H. Ellenberger <frank.h.ellenberger@gmail.com>
|
2001-08-19 16:51:29 -05:00
|
|
|
#check args
|
|
|
|
if [ $# -eq 0 ]
|
|
|
|
then
|
|
|
|
cat <<!
|
2001-10-03 04:28:48 -05:00
|
|
|
Usage: `basename $0` gnc-glossary.txt > gnucash-glossary.pot
|
2001-08-19 16:51:29 -05:00
|
|
|
!
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
GLOSSARY_CSV="$1";
|
|
|
|
|
|
|
|
if [ ! -f "$GLOSSARY_CSV" ]
|
|
|
|
then
|
|
|
|
echo "Can't find $GLOSSARY_CSV.";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
2021-02-08 18:57:52 -06:00
|
|
|
# Note: Line 2, 3, 9, 18: PROJECT, CHARSET and probably a few other variables are hardcoded
|
2001-08-19 16:51:29 -05:00
|
|
|
cat <<!
|
2019-08-14 17:19:46 -05:00
|
|
|
# SOME DESCRIPTIVE TITLE. (Glossary)
|
2019-06-29 04:29:58 -05:00
|
|
|
# This file is distributed under the same license as the GnuCash package.
|
2020-09-04 15:40:49 -05:00
|
|
|
# Copyright (C) YEAR by the GnuCash developers and the translators:
|
2001-08-19 16:51:29 -05:00
|
|
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
|
|
#
|
|
|
|
#, fuzzy
|
|
|
|
msgid ""
|
|
|
|
msgstr ""
|
2020-09-04 15:40:49 -05:00
|
|
|
"Project-Id-Version: GnuCash VERSION\n"
|
|
|
|
"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug.cgi?"
|
|
|
|
"product=GnuCash&component=Translations\n"
|
2001-08-19 16:51:29 -05:00
|
|
|
"POT-Creation-Date: `date +'%Y-%m-%d %H:%M%z'`\n"
|
|
|
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
|
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
2019-06-29 04:29:58 -05:00
|
|
|
"Language: \n"
|
2001-08-19 16:51:29 -05:00
|
|
|
"MIME-Version: 1.0\n"
|
2021-02-08 18:57:52 -06:00
|
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
2019-06-29 04:29:58 -05:00
|
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
2001-08-19 16:51:29 -05:00
|
|
|
|
|
|
|
!
|
|
|
|
|
|
|
|
#Yes this is the most simple awk script you've ever seen :)
|
|
|
|
awk -F'\t' '{if ($2 != "") print "#. "$2; print "msgid "$1; print "msgstr \"\"\n"}' \
|
|
|
|
$GLOSSARY_CSV
|