Skip to content

Commit 1dd6b8b

Browse files
authored
Create 7.6.-How-to-contribute.md
1 parent baf4b57 commit 1dd6b8b

1 file changed

Lines changed: 207 additions & 0 deletions

File tree

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
---
2+
path: fr/7.6.-How-to-contribute.md
3+
---
4+
5+
# Comment contribuer ?
6+
## Contribuer au code
7+
8+
Merci de lire les [lignes directives de la contribution](https://github.com/ccbogel/QualCoder?tab=contributing-ov-file)
9+
10+
## Contribuer à la traduction
11+
### Traduire la documentation
12+
13+
Il est possible de traduire la documentation, en créant / modifiant les fichiers markdown dans docs/doc dans [le dépôt du site internet](https://github.com/QualCoder-Org/qualcoder-org.github.io).
14+
15+
### Traduire le logiciel
16+
17+
Il existe plusieurs fichiers de traduction, qui s’ouvrent avec [Poedit](https://poedit.net/). Les fichiers .qm se trouvent dans src/qualcoder/GUI. Les fichiers .po se trouvent dans src/qualcoder. Il est possible de mettre à jour le fichier langue en faisant ```python rebuild_lang.py --update``` et de compiler en faisant ```python rebuild_lang.py --compile```.
18+
19+
Glossaire concernant la traduction, afin d’avoir une cohérence dans la traduction :
20+
21+
- Speakers : Intervenant⋅es
22+
- Coder : Codeur·euse
23+
- Case : cas
24+
- Transcript : Retranscription
25+
- Counts : occurrences
26+
- Automatic coding : autocodage
27+
- Mark : Surligner
28+
- Prompt AI : [Instruction](https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000050185686)
29+
- Stop words: mots vides
30+
- Codebook : Grille de codage
31+
- Red weak : Protanomalie
32+
- Red blind : Protanopie
33+
- Green weak : Deutéranomalie
34+
- Green blind : Deutéranopie
35+
- Pie charts : Diagrammes circulaires
36+
- Bar charts : Graphique à barres
37+
38+
39+
40+
41+
42+
43+
```
44+
---------------
45+
46+
Notes for creating language files
47+
48+
49+
=================================
50+
51+
52+
List_of_ISO_639-1_codes
53+
54+
55+
2 letter codes for different languages
56+
57+
58+
59+
60+
61+
For Qt translations files: .ts to .qm
62+
63+
64+
=====================================
65+
66+
67+
Installs:
68+
69+
70+
sudo apt install python-setuptools
71+
72+
73+
sudo apt install qttools5-dev-tools # for project.pro to convert multiple files at once
74+
75+
76+
sudo apt install qtcreator
77+
78+
79+
sudo apt -y install linguist-qt6
80+
81+
82+
sudo apt install pyqt6-dev-tools
83+
84+
85+
86+
87+
88+
In directory qualcoder/GUI
89+
90+
91+
Need a .pro file in the qualcoder/GUI directory
92+
93+
94+
run:
95+
96+
97+
pylupdate5 project.pro -noobsolete
98+
99+
100+
101+
102+
103+
Note pylupdate6 does not work well, it replaces with blank entries, instead of drawing from existing ts files.
104+
105+
106+
107+
108+
109+
This helper file for this: rebuild_lang.py will updat all the placeholders fo rthe languages in both po and ts files. Run from the Qualcder-master efolder.
110+
111+
112+
113+
114+
115+
ts files are released as app_name.qm
116+
117+
118+
Release is placed in qualcoder/locale/name/name.qm
119+
120+
121+
122+
123+
124+
#####################################
125+
126+
127+
128+
129+
130+
Strings in python code need to be translated.
131+
132+
133+
https://docs.python.org/3/library/gettext.html#internationalizing-your-programs-and-modules
134+
135+
136+
137+
138+
139+
Code in the main module:
140+
141+
142+
install gettext
143+
144+
145+
At the start:
146+
147+
148+
lang = gettext.translation('qualcoder', localedir='/GUI/', languages=['fr'])
149+
150+
151+
lang.install()
152+
153+
154+
155+
156+
157+
158+
159+
160+
# Install poedit
161+
162+
163+
sudo apt install poedit
164+
165+
166+
167+
168+
169+
In terminal, run these scripts from the qualcoder folder to prepare the po files:
170+
171+
172+
Note this is replaced with the above helper file.
173+
174+
175+
176+
177+
178+
-d is default output name e.g. fr
179+
180+
181+
-j option to join existing file
182+
183+
184+
# note dont use -j lang.po on first creating a po file
185+
186+
187+
188+
189+
190+
For individual update to po files see below example for Deutsch:
191+
192+
193+
194+
195+
196+
xgettext -d de -j de.po __main__.py add_attribute.py add_item_name.py ai_chat.py ai_llm.py ai_prompts.py ai_search_dialog.py ai_vectorstore.py attributes.py case_file_manager.py cases.py code_color_scheme.py code_text.py code_in_all_files.py code_organiser.py code_pdf.py codebook.py color_selector.py confirm_delete.py edit_textfile.py helpers.py import_survey.py import_twitter_data.py information.py journals.py manage_files.py manage_links.py manage_references.py memo.py merge_projects.py move_resize_rectangle.py pseudonyms.py refi.py report_attributes.py report_codes.py report_code_summary.py report_codes_by_segments.py report_compare_coder_file.py report_cooccurrence.py report_exact_matches.py report_file_summary.py report_relations.py reports.py report_sql.py rqda.py save_sql_query.py select_items.py settings.py special_functions.py text_mining.py view_av.py view_charts.py view_graph.py view_image.py
197+
198+
199+
200+
201+
202+
After translating, save will produce a name.po and a name.mo file
203+
```
204+
205+
206+
207+
The .mo file is placed in qualcoder/locale/name/LC_MESSAGES/name.m

0 commit comments

Comments
 (0)