Provide option to record untranslated strings in database

Created on 20 January 2009, about 16 years ago
Updated 14 June 2024, 10 months ago

It would be useful to be able to process all modules and themes and directly add missing strings to the locales_source table.

See #361614: Make locale() read only? β†’ .

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada nedjo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Merge request !25Save strings to locales_source. β†’ (Open) created by charginghawk
  • Pipeline finished with Success
    10 months ago
    Total: 143s
    #199299
  • πŸ‡ΊπŸ‡ΈUnited States charginghawk

    This is an old issue, but I wanted to extract translatable strings from the codebase and save them to locales_source, so here we are. Here's what the MR does:

    1. Adds a new database table, potx_locales_filesystem_location, you can join with locales_source, that saves the locale id, the module / theme name, the filepath within the module/theme, and the filepath to the module/theme.
    2. Adds a function, _potx_write_to_locales_source(), that adds strings to locales_source if they aren't there already, and updates the table mentioned above. This function is called from _potx_build_files().
    3. Adds support for TMGMT, a source plugin viewable at /admin/tmgmt/sources/potx_locale/default, where you can see the extracted strings if they have info in potx_locales_filesystem_location, and filter by path and name.
    4. It doesn't work for drush. It only works if you use the UI to extract strings /admin/config/regional/translate/extract. That probably should be fixed.

  • Pipeline finished with Success
    9 months ago
    Total: 176s
    #207061
  • Pipeline finished with Success
    7 months ago
    Total: 173s
    #287633
Production build 0.71.5 2024