updated language constants and tables
[openemr.git] / contrib / util / language_translations / README
blobd86090044abeda5d8bcb0c3e66698d2d44089f67
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 conversion to tsv format (and processed by
54 the buildLanguageDatabase.pl is kept in the
55 current_spreadsheet.tsv file. Conversion is done by exporting spreadsheet
56 from google docs (ods format). Then, open this file in Open Office and 
57 select File->Save as. For 'Save as type:' select 'TEXT CSV (.csv)', toggle
58 on 'Edit Filter Setting', and change filename extension to .tsv. If asked
59 for confirmation select 'Yes'. Then select 'Unicode (UTF-8)' for 'Character
60 set', select {Tab} for 'Field delimiter', and select nothing (make blank by
61 removing the " character) for 'Text delimiter', and then click 'OK'.
63 The current_spreadsheet.tsv file is what can be uploaded to Google Docs for
64 collaboration.
66 The currentLanguage_utf8.sql and currentLanguage_latin1.sql holds current
67 sql tables dumpfile.
69 To insert these translation tables into your OpenEMR refer to
70 instructions at this page in the wiki:
71 http://www.oemr.org/modules/wiwimod/index.php?page=InstallTranslations