Difference between revisions of "I18nTeam/Migration-to-weblate/migration-tools"
Rhkddlf7911 (talk | contribs) (→Migration Plan) |
Damekyung98 (talk | contribs) (→2. Project Migration Tools) |
||
| (12 intermediate revisions by 2 users not shown) | |||
| Line 7: | Line 7: | ||
=== Who's joining the migration tools project === | === Who's joining the migration tools project === | ||
* Gwang-Il Kim | * Gwang-Il Kim | ||
| + | * DaGyeong Kim | ||
=== Migration Plan === | === Migration Plan === | ||
| + | |||
| + | ==== 1. Language Migration ==== | ||
* Remove all existing languages from Weblate that are not needed. | * Remove all existing languages from Weblate that are not needed. | ||
** Use delete_languages.py | ** Use delete_languages.py | ||
* Recreate languages in Weblate to match the plural-forms and settings defined in Zanata. | * Recreate languages in Weblate to match the plural-forms and settings defined in Zanata. | ||
** Use create_languages_weblate.py | ** Use create_languages_weblate.py | ||
| − | * | + | |
| + | ==== 2. Project Migration ==== | ||
| + | |||
| + | =====Set up the environment to migrate.===== | ||
| + | * Set up the environment by installing system and python dependencies. | ||
| + | * Configure the workspace folder as working directories. | ||
| + | |||
| + | =====Generate POT files for project.===== | ||
| + | * Extract strings for translation from project. | ||
| + | * Generate template files(POT) for migration. | ||
| + | |||
| + | =====Extract Translation files===== | ||
| + | * Pull all locale translation files(PO) from Zanata | ||
| + | |||
| + | =====Create Weblate project===== | ||
| + | * Create a project in Weblate using the OpenStack project name. | ||
| + | |||
| + | =====Create a global glossary===== | ||
| + | * Create a glossary component within the project for terminology consistency. | ||
| + | * There is only one glossary per project. | ||
| + | |||
| + | =====Create Weblate Category ===== | ||
| + | * Categories are collections of related components. | ||
| + | * Create categories to organize and display different versions. | ||
| + | |||
| + | =====Create Weblate components.===== | ||
| + | * Component is a grouping of something for translation. | ||
| + | * Create component with pot files. | ||
| + | |||
| + | * There is component attributes to use: | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | ! key !! value | ||
| + | |- | ||
| + | | file format || po | ||
| + | |- | ||
| + | | filemask || locale/*/LC_MESSAGES/<component_name>.po | ||
| + | |- | ||
| + | | new_base || <component_name>.pot | ||
| + | |- | ||
| + | | source_language || en_US | ||
| + | |} | ||
| + | |||
| + | Note: The filemask depends on the project type. | ||
| + | |||
| + | =====Create Weblate translation.===== | ||
| + | * Translations represent language-specific versions of components. | ||
| + | * Create translations for all locales that exist in Zanata. | ||
| + | * Ensure locale names match the language codes used by the Weblate server. | ||
| + | |||
| + | =====Push translation files into Weblate translation.===== | ||
| + | * Upload the PO files extracted from Zanata to their corresponding translations in Weblate. | ||
=== Migration Tools === | === Migration Tools === | ||
| Line 24: | Line 78: | ||
** Provides a safe way to remove languages from Weblate. | ** Provides a safe way to remove languages from Weblate. | ||
** Supports dry-run mode for verification before actual deletion and generates a summary report. | ** Supports dry-run mode for verification before actual deletion and generates a summary report. | ||
| + | |||
==== 2. Project Migration Tools ==== | ==== 2. Project Migration Tools ==== | ||
| + | * The migration script patch was split to reduce its size. | ||
| + | ** https://review.opendev.org/c/openstack/i18n/+/961075 | ||
| + | * We track feature development using Launchpad blueprints. | ||
| + | ** https://blueprints.launchpad.net/openstack-i18n/+spec/weblate-migration | ||
=== Testing and Integration === | === Testing and Integration === | ||
| Line 31: | Line 90: | ||
=== Openinfra Forum in Korea === | === Openinfra Forum in Korea === | ||
* Openstack Weblate Migration - Language Migration: ( https://forum.openinfra-kr.org/t/openstack-weblate-migration-language-migration/269 ) | * Openstack Weblate Migration - Language Migration: ( https://forum.openinfra-kr.org/t/openstack-weblate-migration-language-migration/269 ) | ||
| + | * OpenStack Weblate Migration - Migration Preparation: ( https://forum.openinfra-kr.org/t/openstack-weblate-migration-1-migration/277 ) | ||
| + | * OpenStack Weblaet Migration - Project Migration: ( https://forum.openinfra-kr.org/t/openstack-weblate-migration-2-weblate-migration/278 ) | ||
Latest revision as of 13:21, 14 October 2025
Contents
- 1 Migration Tools for Weblate
- 1.1 Overview
- 1.2 Who's joining the migration tools project
- 1.3 Migration Plan
- 1.3.1 1. Language Migration
- 1.3.2 2. Project Migration
- 1.3.2.1 Set up the environment to migrate.
- 1.3.2.2 Generate POT files for project.
- 1.3.2.3 Extract Translation files
- 1.3.2.4 Create Weblate project
- 1.3.2.5 Create a global glossary
- 1.3.2.6 Create Weblate Category
- 1.3.2.7 Create Weblate components.
- 1.3.2.8 Create Weblate translation.
- 1.3.2.9 Push translation files into Weblate translation.
- 1.4 Migration Tools
- 1.5 Testing and Integration
- 1.6 Openinfra Forum in Korea
Migration Tools for Weblate
Overview
- This page documents the ongoing migration from Zanata to Weblate for the OpenStack I18n project.
- The migration involves language migration tools and project migration tools.
Who's joining the migration tools project
- Gwang-Il Kim
- DaGyeong Kim
Migration Plan
1. Language Migration
- Remove all existing languages from Weblate that are not needed.
- Use delete_languages.py
- Recreate languages in Weblate to match the plural-forms and settings defined in Zanata.
- Use create_languages_weblate.py
2. Project Migration
Set up the environment to migrate.
- Set up the environment by installing system and python dependencies.
- Configure the workspace folder as working directories.
Generate POT files for project.
- Extract strings for translation from project.
- Generate template files(POT) for migration.
Extract Translation files
- Pull all locale translation files(PO) from Zanata
Create Weblate project
- Create a project in Weblate using the OpenStack project name.
Create a global glossary
- Create a glossary component within the project for terminology consistency.
- There is only one glossary per project.
Create Weblate Category
- Categories are collections of related components.
- Create categories to organize and display different versions.
Create Weblate components.
- Component is a grouping of something for translation.
- Create component with pot files.
- There is component attributes to use:
| key | value |
|---|---|
| file format | po |
| filemask | locale/*/LC_MESSAGES/<component_name>.po |
| new_base | <component_name>.pot |
| source_language | en_US |
Note: The filemask depends on the project type.
Create Weblate translation.
- Translations represent language-specific versions of components.
- Create translations for all locales that exist in Zanata.
- Ensure locale names match the language codes used by the Weblate server.
Push translation files into Weblate translation.
- Upload the PO files extracted from Zanata to their corresponding translations in Weblate.
Migration Tools
1. Language Migration Tools
- delete_languages.py : Active ( https://review.opendev.org/c/openstack/i18n/+/961371/9 )
- Automatically creates or updates Weblate language configurations to match the existing Zanata language set.
- Uses Weblate REST API to sync language codes, names, plural forms, and text directions in bulk.
- create_languages_weblate.py: Active ( https://review.opendev.org/c/openstack/i18n/+/961371/9 )
- Provides a safe way to remove languages from Weblate.
- Supports dry-run mode for verification before actual deletion and generates a summary report.
2. Project Migration Tools
- The migration script patch was split to reduce its size.
- We track feature development using Launchpad blueprints.
Testing and Integration
- Testing for Weblate integration is currently in the planning stage.
Openinfra Forum in Korea
- Openstack Weblate Migration - Language Migration: ( https://forum.openinfra-kr.org/t/openstack-weblate-migration-language-migration/269 )
- OpenStack Weblate Migration - Migration Preparation: ( https://forum.openinfra-kr.org/t/openstack-weblate-migration-1-migration/277 )
- OpenStack Weblaet Migration - Project Migration: ( https://forum.openinfra-kr.org/t/openstack-weblate-migration-2-weblate-migration/278 )