27 Commits

Author SHA1 Message Date
Ivan Kuchin 34081a9b4e less repetition in script fixing pt root keys 2026-04-07 19:58:39 +02:00
Ivan Kuchin e45afcffee use unlimited line width for reformatted yaml from crowdin
Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>
2026-03-30 19:23:58 +02:00
Ivan Kuchin d8c5727401 show number of crowdin files found too
Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>
2026-03-30 19:23:58 +02:00
Ivan Kuchin a9e3700a1d script to rewrite yaml files using psych 2026-03-30 19:23:58 +02:00
Christophe Bliard ae41e6a77d Add workflow to test seeding in all locales
There is a `script/i18n/test_seed_all_locales` to test seeding in all
locales, or one locale.

A GitHub action tests all locales seeding every week on Sunday at 2 AM
UTC. It can also be triggered manually.

Example:
    script/i18n/test_seed_all_locales         # Seed all locales sequentially
    script/i18n/test_seed_all_locales --list  # Output available locales as JSON
    script/i18n/test_seed_all_locales zh-CN   # Seed a single locale
2026-02-11 15:49:54 +01:00
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00
Henriette Darge f496da2aad Merge release/16.0 into dev 2025-05-16 14:56:25 +02:00
Christophe Bliard 83cadc7179 [63568] Fix crowdin issue manually until we have a better solution
https://community.openproject.org/wp/63568
2025-04-22 16:07:58 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Christophe Bliard 1ae177c2a8 Merge branch 'release/13.4' into dev 2024-03-21 17:22:20 +01:00
Christophe Bliard d653ce6e4c [53584] Fix Portuguese languages mapping
https://community.openproject.org/wp/53584
https://community.openproject.org/wp/53586

When making Portuguese Brazilian and Portuguese Portugal translations
apart from each other in https://community.openproject.org/wp/53374, we
missed that the root key in the `pt-BR.yml` and `pt-PT.yml` files is
still `pt`. The backend is gracefully falling back to the `pt`
translations but the frontend just fails to translate and falls back to
the English strings, leading to mixed English and Portuguese in the user
interface.

A script fixes the root key in the `pt-BR.yml` and `pt-PT.yml` files.
This script is executed each time the translations are updated from
crowdin.
2024-03-21 16:32:17 +01:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard 605d731f73 Use more accurate language translation for pt-BR 2024-03-08 10:58:07 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Christophe Bliard 8af4a60c80 [49795] Avoid zh-TW overwriting zh-CN translation file
Previously, downloading translations files from crowdin would write both
zh-CN and zh-TW to the same file, overwriting the previous one. This
commit adds a mapping to the crowdin.yml file to avoid this.

As a side effect, the script `fix_crowdin_translation_filenames.rb` is now
superfluous.
2023-08-28 10:30:10 +02:00
Oliver Günther 8d8dfe5e93 Remove check for in-context translations (fixed) 2023-07-17 09:26:47 +02:00
Oliver Günther 784361c03c Skip fixing in-context translation files 2023-07-17 09:15:48 +02:00
Christophe Bliard 63d3d127dc Send modules/**/en.seeders.yml to crowdin
https://community.openproject.org/wp/48450

Before this commit, `modules/bim/config/locales/en.seeders.yml` would be
sent to crowdin as `<branch>/en.seeders.yml` and would be ignored as
`config/locales/en.seeders.yml` is already sent as
`<branch>/en.seeders.yml` first.

This happens because crowdin CLI removes the common path of a group of
source files. As this file is alone in his group, the whole path is
removed and only the file name remains.

The fix is to have another empty source file in another module to change
the common path computation and get the right final file:
`<branch>/bim/config/locales/en.seeders.yml`.
2023-07-06 15:46:06 +02:00
Christophe Bliard c09b8400c5 Add all languages for default language selection 2023-06-16 16:51:08 +02:00
Christophe Bliard 914272c6cf Only allow available languages for Setting.default_language
- Store the language information everywhere as string instead of symbol.
- Remove pt-BR from default available_languages as pt is already there.
2023-06-06 11:46:24 +02:00
Christophe Bliard 3a331309a2 Create crowdin source file from multiple seed files
Typically, common.yml and standard.yml content are merged together to
generate the `config/locales/en.seeders.yml` file.
2023-05-30 15:48:14 +02:00
Christophe Bliard da773a1248 Fix translations overwritten by seeders translations 2023-05-11 12:08:37 +02:00
Christophe Bliard 971803d5e6 Can run generate_seeders_i18n_source_file without rails runner 2023-05-11 11:35:20 +02:00
Christophe Bliard 9113c46f92 Send crowdin source file for seeders translations
https://community.openproject.org/wp/48016
2023-05-10 09:35:09 +02:00
Christophe Bliard 882dd81295 Use language names from CLDR
script/i18n_generate_languages_translations can fetch CLDR and generate the yml translation files automatically.

Group i18n related scripts in a directory
2023-03-06 14:44:31 +01:00