forked from ccbogel/QualCoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Language notes
127 lines (89 loc) · 5.4 KB
/
Language notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
Notes for creating language files
=================================
List_of_ISO_639-1_codes
2 letter codes for differnt languages
jp should be ja but already in place now.
Installs:
sudo apt install python-setuptools
sudo apt install qttools5-dev-tools
sudo apt install qtcreator
For Linguist:
qt4-linguist-tools
qt4-dev-tools
libqt4-devel
sudo apt install qt5-doc
In directory qualcoder/GUI
Need a .pro file in the qualcoder/GUI directory
run:
pylupdate5 project.pro
project.pro
===========
SOURCES = ui_attribute.py \
ui_case_file_manager.py \
ui_dialog_add_item.py \
ui_dialog_assign_attribute.py \
ui_dialog_cases.py \
ui_case_file_manager.py \
ui_dialog_code_av.py \
ui_dialog_code_image.py \
ui_dialog_code_relations.py \
ui_dialog_codes.py \
ui_dialog_colour_selector.py \
ui_dialog_confirm_delete.py \
ui_dialog_import.py \
ui_dialog_information.py \
ui_dialog_journals.py \
ui_dialog_manage_attributes.py \
ui_dialog_manage_files.py \
ui_dialog_memo.py \
ui_dialog_report_code_frequencies.py \
ui_dialog_report_codings.py \
ui_dialog_report_comparisons.py \
ui_dialog_report_file_summary.py \
ui_dialog_select_items.py \
ui_dialog_settings.py \
ui_dialog_SQL.py \
ui_dialog_start_and_end_marks.py \
ui_dialog_text_mining.py \
ui_dialog_view_av.py \
ui_dialog_view_image.py \
ui_dialog_main.py \
ui_dialog_queryDetails.py \
ui_dialog_attribute_parameters.py \
ui_dialog_visualise_graph_original.py
TRANSLATIONS = app_de.ts \
app_fr.ts \
app_el.ts \
app_it.ts \
app_es.ts \
app_jp.ts \
app_pt.ts
CODECFORTR = ISO-8859-5
Double-click to open the .pro file in Qt Creator
Go to Tools > External > Linguist > update Translations
Release as app_name.qm
Release is placed in qualcoder/locale/name/name.qm
#####################################
Strings in python code need to be translated.
https://docs.python.org/3/library/gettext.html#internationalizing-your-programs-and-modules
Code in the main module:
install gettext
At the start:
lang = gettext.translation('qualcoder', localedir='/GUI/', languages=['fr'])
lang.install()
# Install poedit
sudo apt install poedit
In terminal, run these scripts from the qualcoder folder:
-d is default output name e.g. fr
-j option to join existing file
# note dont use -j lang.po on first creating a po file
outputs of below scripts are de.po, es.po, fr.po, gr.po, jp.po
xgettext -d de -j de.po add_attribute.py add_item_name.py attributes.py case_file_manager.py cases.py code_text.py codebook.py color_selector.py confirm_delete.py dialog_sql.py import_survey.py information.py journals.py manage_files.py memo.py qualcoder.py refi.py report_attributes.py reports.py rqda.py select_items.py settings.py text_mining.py view_av.py view_graph_original.py view_image.py report_relations.py
xgettext -d el -j el.po add_attribute.py add_item_name.py attributes.py case_file_manager.py cases.py code_text.py codebook.py color_selector.py confirm_delete.py dialog_sql.py import_survey.py information.py journals.py manage_files.py memo.py qualcoder.py refi.py report_attributes.py reports.py rqda.py select_items.py settings.py text_mining.py view_av.py view_graph_original.py view_image.py report_relations.py
xgettext -d es -j es.po add_attribute.py add_item_name.py attributes.py case_file_manager.py cases.py code_text.py codebook.py color_selector.py confirm_delete.py dialog_sql.py import_survey.py information.py journals.py manage_files.py memo.py qualcoder.py refi.py report_attributes.py reports.py rqda.py select_items.py settings.py text_mining.py view_av.py view_graph_original.py view_image.py report_relations.py
xgettext -d fr -j fr.po add_attribute.py add_item_name.py attributes.py case_file_manager.py cases.py code_text.py codebook.py color_selector.py confirm_delete.py dialog_sql.py import_survey.py information.py journals.py manage_files.py memo.py qualcoder.py refi.py report_attributes.py reports.py rqda.py select_items.py settings.py text_mining.py view_av.py view_graph_original.py view_image.py report_relations.py
xgettext -d it -j it.po add_attribute.py add_item_name.py attributes.py case_file_manager.py cases.py code_text.py codebook.py color_selector.py confirm_delete.py dialog_sql.py import_survey.py information.py journals.py manage_files.py memo.py qualcoder.py refi.py report_attributes.py reports.py rqda.py select_items.py settings.py text_mining.py view_av.py view_graph_original.py view_image.py report_relations.py
xgettext -d jp -j jp.po add_attribute.py add_item_name.py attributes.py case_file_manager.py cases.py code_text.py codebook.py color_selector.py confirm_delete.py dialog_sql.py import_survey.py information.py journals.py manage_files.py memo.py qualcoder.py refi.py report_attributes.py reports.py rqda.py select_items.py settings.py text_mining.py view_av.py view_graph_original.py view_image.py report_relations.py
xgettext -d pt -j pt.po add_attribute.py add_item_name.py attributes.py case_file_manager.py cases.py code_text.py codebook.py color_selector.py confirm_delete.py dialog_sql.py import_survey.py information.py journals.py manage_files.py memo.py qualcoder.py refi.py report_attributes.py reports.py rqda.py select_items.py settings.py text_mining.py view_av.py view_graph_original.py view_image.py report_relations.py
After translating, save will produce a name.po amd a name.mo file
The .mo file is placed in qualcoder/locale/name/LC_MESSAGES/name.mo