Difference between revisions of "I18nTeam/Migration-to-weblate"
Damekyung98 (talk | contribs) (→List of projects and status) |
Damekyung98 (talk | contribs) (→List of projects and status) |
||
| Line 53: | Line 53: | ||
** (describe the role of the tool ) | ** (describe the role of the tool ) | ||
| − | === | + | === Migration plan === |
| + | |||
| + | ==== Component Mapping ==== | ||
| + | The following table defines the structural mapping between Zanata and Weblate to ensure consistency during migration and resource synchronization. | ||
| − | + | {| class="wikitable" style="width: 100%;" | |
| − | {| class="wikitable" | + | ! Zanata !! Weblate !! Description |
|- | |- | ||
| − | + | | '''Project''' || '''Project''' || Top-level organizational unit. | |
|- | |- | ||
| − | | | + | | '''Version''' || '''Category''' || Versions in Zanata are mapped to Categories in Weblate. |
|- | |- | ||
| − | | | + | | '''Document''' || '''Component''' || Individual translation resources or files. |
|- | |- | ||
| − | | | + | | '''Language''' || '''Language''' || Target locales for translation. |
|} | |} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==== Naming Convention ==== | ==== Naming Convention ==== | ||
| − | ===== Project | + | ===== Project and Category ===== |
| − | + | To maintain structural hierarchy, Zanata's organizational units are mapped directly to Weblate as follows: | |
| − | * Zanata | + | * '''Project''': Zanata Project names map to Weblate Project names. |
| − | + | * '''Category''': Zanata Version names map to Weblate Category names. | |
| − | |||
| − | |||
| − | + | ===== Component Identification ===== | |
| + | Unlike Zanata, which uses directory paths to distinguish documents, Weblate requires unique component names within the same project/category. | ||
| + | To prevent naming conflicts when multiple modules exist, we use a structured naming convention: | ||
| + | * '''Format:''' `<module_name>-<project_kind>` | ||
| + | * '''Separator:''' A hyphen (`-`) is used as the standard separator. | ||
| − | + | {| class="wikitable" style="width: 80%;" | |
| − | + | ! Zanata Document Name !! Naming Collision !! Resolved Weblate Component Name | |
| − | {| class="wikitable" | ||
| − | |||
| − | ! Zanata !! | ||
|- | |- | ||
| − | | horizon/locale/django || django( | + | | horizon/locale/django || django (Conflict) || '''horizon-django''' |
|- | |- | ||
| − | | openstack_dashboard/locale/django || django( | + | | openstack_dashboard/locale/django || django (Conflict) || '''openstack-dashboard-django''' |
|} | |} | ||
| − | + | ===== Languages ===== | |
| + | Weblate follows the existing Zanata language code convention to ensure seamless resource mapping. | ||
| − | + | * '''Format:''' `language_COUNTRY` (e.g., `en_US`, `ko_KR`) | |
| + | * '''Casing Rules:''' | ||
| + | ** '''Language:''' Always lowercase. | ||
| + | ** '''Country:''' Always uppercase. | ||
| + | ** For neutral languages without a specific region, only the lowercase language code is used (e.g., `ko`, `ja`, `fr`). | ||
| − | + | : '''Note:''' For detailed rules regarding plural forms, please refer to: [[Language Plurals]] | |
| − | |||
| − | |||
| − | |||
| − | |||
==== Translation Accuracy Metrics ==== | ==== Translation Accuracy Metrics ==== | ||
| Line 119: | Line 109: | ||
* Source strings: The total number of original English messages that need to be translated. | * Source strings: The total number of original English messages that need to be translated. | ||
* Translated strings: The number of messages that have been successfully translated into the target language. | * Translated strings: The number of messages that have been successfully translated into the target language. | ||
| − | |||
We calculate accuracy based on the ratio of accurate strings across all versions, considering both source strings and translated strings. | We calculate accuracy based on the ratio of accurate strings across all versions, considering both source strings and translated strings. | ||
| Line 128: | Line 117: | ||
* File-level comparison of all translated files between Zanata and Weblate to verify data integrity | * File-level comparison of all translated files between Zanata and Weblate to verify data integrity | ||
| − | ==== | + | === List of projects and status === |
| + | |||
| + | ==== Migration Scope ==== | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | ! Item !! Count | ||
| + | |- | ||
| + | | Total projects || 127 | ||
| + | |- | ||
| + | | Total versions || 12 | ||
| + | |- | ||
| + | | Total Languages || 54 | ||
| + | |} | ||
| + | |||
| + | ==== Version ==== | ||
| + | We determined the migration version based on the branches that currently exist in the main services. | ||
| + | Note: Some projects may not have this branch. | ||
| + | |||
| + | Versions to migrate: | ||
| + | * master | ||
| + | * stable/2025.2 | ||
| + | * stable/2025.1 | ||
| + | * stable/2024.2 | ||
| + | * stable/2024.1 | ||
| + | |||
| + | : '''Note:''' "unmaintained/*" branches are not included in the migration scope. | ||
| + | |||
| + | ==== Migration Status ==== | ||
For more details about accuracy, please refer to the Launchpad bugs. | For more details about accuracy, please refer to the Launchpad bugs. | ||
Revision as of 03:51, 4 January 2026
Contents
Migration to weblate
Who's joining the migration project
- Ian Y. Choi (Manager)
- Seongsoo Cho
- Kuemjong Jeong
- Nayeon Kim
- Sion Shin
- Gwangil Kim
- DaGyeong Kim
Planning a weblate migration schedule
You can find more details about each task below.
- Define the scope of target test projects
- All vs. a few projects (e.g., openstack-manuals, nova, i18n, horizon)
- Make Translation Infrastructure Scripts compatible with Weblate
- Weblate project creation with settings if the target project is not existing on the platform
- (If it is not supported, Weblate projects will be created manually)
- Testing needs to be performed locally, since the scripts are executed on 06:00 UTC daily.
- Weblate project creation with settings if the target project is not existing on the platform
- ZuuL Integration Test
- Determine when to test (e.g., Test methodology without waiting at 06:00 UTC?)
- Integration test with all translation target projects
- Making tools for extracting statistical data from Weblate
Action Item
Define the scope of target test projects
- Configure Weblate with the information set in Zanata.
- User information is not migrated.
Make Translation Infrastructure Scripts compatible with Weblate
- WIP patch to support Weblate for https://opendev.org/openstack/openstack-zuul-jobs/src/branch/master/roles/prepare-zanata-client/files/
Zuul Integration Test
Create and test a ZuuL Job that performs the following tasks
- Uploading translation files to Weblate when new changes are made to your project
- Upload translations from Weblate to your project every day at 06 UTC
Making tools for extracting statistical data from Weblate
- weblate_userinfo.py : Done ( https://review.opendev.org/c/openstack/i18n/+/893361 )
- Generates a csv file which contains the list of translators for a specified target role with name and e-mail address. Requires privileges to access Weblate accounts API.
- weblate_users.py : Done ( https://review.opendev.org/c/openstack/i18n/+/895763 )
- Generates a list of Weblate language contributors.
- weblate_utils.py : Done ( https://review.opendev.org/c/openstack/i18n/+/896308 )
- Provides basic classes used by the other scripts
- IniConfig class to get the key and url for the weblate server
- WeblateRestService class that communicates with the Weblate REST API
- Provides basic classes used by the other scripts
- weblate_stats.py : Working ( https://review.opendev.org/c/openstack/i18n/+/896306 )
- (describe the role of the tool )
- weblate_records.py : Working ( https://review.opendev.org/c/openstack/i18n/+/896306 )
- (describe the role of the tool )
Migration plan
Component Mapping
The following table defines the structural mapping between Zanata and Weblate to ensure consistency during migration and resource synchronization.
| Zanata | Weblate | Description |
|---|---|---|
| Project | Project | Top-level organizational unit. |
| Version | Category | Versions in Zanata are mapped to Categories in Weblate. |
| Document | Component | Individual translation resources or files. |
| Language | Language | Target locales for translation. |
Naming Convention
Project and Category
To maintain structural hierarchy, Zanata's organizational units are mapped directly to Weblate as follows:
- Project: Zanata Project names map to Weblate Project names.
- Category: Zanata Version names map to Weblate Category names.
Component Identification
Unlike Zanata, which uses directory paths to distinguish documents, Weblate requires unique component names within the same project/category.
To prevent naming conflicts when multiple modules exist, we use a structured naming convention:
- Format: `<module_name>-<project_kind>`
- Separator: A hyphen (`-`) is used as the standard separator.
| Zanata Document Name | Naming Collision | Resolved Weblate Component Name |
|---|---|---|
| horizon/locale/django | django (Conflict) | horizon-django |
| openstack_dashboard/locale/django | django (Conflict) | openstack-dashboard-django |
Languages
Weblate follows the existing Zanata language code convention to ensure seamless resource mapping.
- Format: `language_COUNTRY` (e.g., `en_US`, `ko_KR`)
- Casing Rules:
- Language: Always lowercase.
- Country: Always uppercase.
- For neutral languages without a specific region, only the lowercase language code is used (e.g., `ko`, `ja`, `fr`).
- Note: For detailed rules regarding plural forms, please refer to: Language Plurals
Translation Accuracy Metrics
Due to inconsistent word count calculations across different translation platforms, we measure accuracy by the number of strings rather than word count.
We evaluate translation accuracy using the following metrics:
- Source strings: The total number of original English messages that need to be translated.
- Translated strings: The number of messages that have been successfully translated into the target language.
We calculate accuracy based on the ratio of accurate strings across all versions, considering both source strings and translated strings.
What gets checked:
- Total string counts (source and translated)
- Translation completion rates
- File-level comparison of all translated files between Zanata and Weblate to verify data integrity
List of projects and status
Migration Scope
| Item | Count |
|---|---|
| Total projects | 127 |
| Total versions | 12 |
| Total Languages | 54 |
Version
We determined the migration version based on the branches that currently exist in the main services. Note: Some projects may not have this branch.
Versions to migrate:
- master
- stable/2025.2
- stable/2025.1
- stable/2024.2
- stable/2024.1
- Note: "unmaintained/*" branches are not included in the migration scope.
Migration Status
For more details about accuracy, please refer to the Launchpad bugs.