mix gettext.import_csv (game_server_web v1.0.941)

Copy Markdown

Imports translations from a CSV file back into PO files and theme JSON config.

Usage

mix gettext.import_csv LOCALE FILE [--dry-run] [--config BASE_PATH]

Examples

mix gettext.import_csv es translations_es.csv
mix gettext.import_csv es translations_es.csv --dry-run
mix gettext.import_csv es translations_es.csv --config modules/example_config.json

The CSV must have at minimum the columns: domain, msgid, translation. Optional columns: source, fuzzy.

Rows with domain _config are written to the theme JSON config file. All other rows update the corresponding PO files.

The task matches PO rows by (domain, msgid) pair and updates only the msgstr (translation) fields. It will NOT add new msgids — those must be created via mix gettext.extract --merge.

Use --dry-run to preview changes without writing files.