How to contribute
Contributing to the code
Please read the contribution guidelines
Contribute to the translation
Translate the documentation
You can translate the documentation by creating/modifying the markdown files in docs/doc in the website repository.
Translate the software
There are several translation files, which can be opened with Poedit. The .qm files are located in src/qualcoder/GUI. The .po files are located in src/qualcoder. You can update the language file by running python rebuild_lang.py --update and compile by running python rebuild_lang.py --compile
---------------
Notes for creating language files
=================================
List_of_ISO_639-1_codes
2 letter codes for different languages
For Qt translations files: .ts to .qm
=====================================
Installs:
sudo apt install python-setuptools
sudo apt install qttools5-dev-tools # for project.pro to convert multiple files at once
sudo apt install qtcreator
sudo apt -y install linguist-qt6
sudo apt install pyqt6-dev-tools
In directory qualcoder/GUI
Need a .pro file in the qualcoder/GUI directory
run:
pylupdate5 project.pro -noobsolete
Note pylupdate6 does not work well, it replaces with blank entries, instead of drawing from existing ts files.
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.
ts files are released 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 to prepare the po files:
Note this is replaced with the above helper file.
-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
For individual update to po files see below example for Deutsch:
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
After translating, save will produce a name.po and a name.mo file
The .mo file is placed in qualcoder/locale/name/LC_MESSAGES/name.mo