Internationalization: Translation Tables Update.
[openemr.git] / contrib / util / language_translations / README
blob0caf00e72eb019b181051915e9f2175c4a015c41
1 This directory holds the developer tools to maintain the language translations.
2 These were created during development of OpenEMR version 3.0.2
4 The collectConstants.pl script can be used to collect all of the constants
5 from the openemr source code.  This script uses the manuallyAddedConstants.txt and 
6 manuallyRemovedConstants.txt list to manually add or remove constants from
7 the final output. Note that it also requires a list of old constants
8 (this can be over-rided) to ensure no old constants are lost (ie ensure
9 previous versions of openemr are still supported) Instructions are included in
10 the file.
11   -The manuallyRemovedConstants.txt file includes constants to filter out.
12    This is a good place to place any 'junk' constants that are erroneously
13    found by collectConstants.pl script.
14   -The manuallyAddedConstants.txt file includes constants to add manually to
15    the list of constants. This should be only temporary as we implement
16    a mechanism for developers to include these constants in the source 
17    code where they are called.
18   -The filterDirectories.txt file includes paths to ignore in the searching.
20 The buildLanguageDatabase.pl performs several functions.
21   -Builds the foreign language SQL tables dumpfile for the lang_languages,
22    lang_constants, and lang_definitions tables from the above
23    current_spreadsheet.tsv file.
24      -Outputs to logfile the database statistics.
25   -Performs data validation on the spreadsheet structure, constants, and
26    constant ID numbers.
27      -Outputs to logfile errors.
28        -The most recent logfile is kept in the log_buildLanguageDatabase.txt file
29          which allows easy debugging (ie. which english constant was modified)
30          via the diff command.
31   -Builds a new spreadsheet that can be used for building an updated spreadsheet
32    via the combineConstantsSpreadsheet.pl script.
34 The combineConstantsSpreadsheet.pl script will combine a the list of constants
35 with the language spreadsheet to create a new spreadsheet that can be uploaded
36 to Google Docs.
38 The sortCleanList.pl script is simply a script to remove blank lines, windows
39 end line, repeats, and sort the manuallyRemovedConstants.txt and 
40 manuallyAddedConstants.txt files.
42 The current official list of constants are kept in the currentConstants.txt file,
43 which are produced by the collectConstants.pl script.
45 The most current spreadsheet is kept in the current_spreadsheet.tsv file (this
46 file is taken after being processed with buildLanguageDatabase.pl script).
48 When adding constants or removing constants then run the collectConstants.pl
49 script to create the list of constants. Then run the
50 combineConstantsSpreadsheet.pl script to re-build an official language spreadsheet
51 to export to Google Docs.
53 The Google Docs spreadsheet after download in tsv format (and processed by
54 the buildLanguageDatabase.pl) is kept in the
55 current_spreadsheet.tsv file. Downloading of the most current google doc
56 spreadsheet is now done via commandline and is described at bottom of
57 this README file.
59 The current_spreadsheet.tsv file is what can be uploaded to Google Docs for
60 collaboration (open the current_spreadsheet.tsv in Open Office first,
61 and then save in Open Office format; then can upload this file to
62 google docs).
64 The currentLanguage_utf8.sql and currentLanguage_latin1.sql holds current
65 sql tables dumpfile.  Latest releases of this are available at:
66 http://www.openmedsoftware.org/wiki/Install_Translations
68 To insert these translation tables into your OpenEMR refer to
69 instructions at this page in the wiki:
70 http://www.oemr.org/modules/wiwimod/index.php?page=InstallTranslations
72 To create a new set of translation tables from the most current google docs
73 spreadsheet, then follow these instructions, which are specific for linux
74 and are run in a temporary directory entitled 'translations' that should be
75 placed one directory above openemr (for paths in following commands to work):
76 cd (to your openemr directory)
77 cd ../
78 mkdir translations
79 cd translations
80 wget -O spreadsheet.tsv "https://spreadsheets.google.com/ccc?key=0AtTW60zHo6HzcGg0UE9JMGJHM1NsSWpuYkh0Snl4Q0E&output=txt"
81 cp ../openemr/contrib/util/language_translations/buildLanguageDatabase.pl .
82 chmod +x buildLanguageDatabase.pl
83 cp ../openemr/contrib/util/language_translations/log_buildLanguageDatabase.txt .
84 cp ../openemr/contrib/util/language_translations/currentConstants.txt .
85 ./buildLanguageDatabase.pl spreadsheet.tsv currentConstants.txt
86 (sanity check) diff log_buildLanguageDatabase.txt log.txt