-
-
Notifications
You must be signed in to change notification settings - Fork 26
Add a new language
benoit74 edited this page Oct 25, 2023
·
4 revisions
When a recipe has to be configured, the list of language displayed in the UI is limited to languages already used in another recipe of the same Zimfarm instance.
In order to create a new recipe with a new language that is not yet used, the following process must be followed:
- editor creates the new recipe (by cloning an existing one for now) and configures everything but the language (since it is not possible) ; the recipe must be disabled at the stage, and must not be requested
- editor requests help from a developer (by opening a ticket in this openzim/zimfarm repo) to ask for language modification. Information needed is:
- Zimfarm instance (probably farm.openzim.org, but it is always better to confirm)
- Recipe name (to fix with proper language)
- Language code (2 letters, from ISO-639-1, see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
- English language name (displayed in the UI, in English)
- Native language name (if known, not used for now)
- developer alter the recipe language directly in the database and closes the issue
- editor check that configuration is ok and enable the recipe
To alter the language in DB, you can run on production DB (do a port forward on PostgreSQL pod with kubectl/k9s):
UPDATE schedule
SET language_code = '<code>', language_name_en = '<name_en>', language_name_native = '<name_native>' where name = '<recipe_name>';
With:
- <recipe_name>: the first recipe in this new language
- <code>: ISO language code
- <name_en>: display name for the UI
- <name_native>: native display named, could be set to <name_en> if not known (it is not really used, at least for now)
And you can check it afterwards with:
SELECT name, language_code, language_name_en, language_name_native FROM schedule WHERE name = '<recipe_name>';