Update translations and new strings in po files

- Adjust line mappings in .po files for translation strings
- Add new translations for custom partitioning, password strength, keyboard setup, installer steps, and network setup strings
- Update POT-Creation-Date in Romanian and Slovak .po files
- Include various new UI strings for installation and try-live options
This commit is contained in:
ericbsd
2025-07-12 21:24:33 -03:00
parent 9db6c513c9
commit 391904b744
58 changed files with 10263 additions and 5540 deletions
+23 -3
View File
@@ -39,9 +39,25 @@ class UpdateTranslationsCommand(Command):
# Define paths
pot_file = 'po/install-station.pot'
po_files = glob.glob('po/*.po')
# Step 1: Extract messages to .pot file
# Check if .pot file exists, create it if it doesn't
if not os.path.exists(pot_file):
print(f"POT file {pot_file} does not exist. Creating it...")
else:
print("Updating existing .pot file...")
# Step 1: Extract messages to .pot file (create or update)
print("Extracting messages to .pot file...")
os.system(f'xgettext --from-code=UTF-8 -L Python -o {pot_file} install_station/*.py install-station')
os.system(
f'xgettext --from-code=UTF-8 -L Python --keyword=get_text -o {pot_file}'
' install_station/*.py install-station'
)
# Verify .pot file was created successfully
if not os.path.exists(pot_file):
print(f"Error: Failed to create {pot_file}")
return
# Step 2: Update .po files with the new .pot file
print("Updating .po files with new translations...")
for po_file in po_files:
@@ -73,7 +89,10 @@ class CreateTranslationCommand(Command):
# Check if the .pot file exists
if not os.path.exists(pot_file):
print("Extracting messages to .pot file...")
os.system(f'xgettext --from-code=UTF-8 -L Python -o {pot_file} install_station/*.py install-station')
os.system(
f'xgettext --from-code=UTF-8 -L Python --keyword=get_text -o {pot_file}'
' install_station/*.py install-station'
)
# Create the new .po file
if not os.path.exists(po_file):
print(f"Creating new {po_file} for locale '{self.locale}'...")
@@ -119,6 +138,7 @@ lib_install_station_backend_query = [
]
data_files = [
(f'{prefix}/lib/install-station', ['src/ghostbsd-style.css']),
(f'{prefix}/lib/install-station/backend-query', lib_install_station_backend_query),
(f'{prefix}/lib/install-station/image', lib_install_station_image)
]