WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
254 stars 203 forks source link

Remove i18n cleanup (`{}` and extra `#`) from the i18n scripts #5149

Open obulat opened 2 weeks ago

obulat commented 2 weeks ago

Description

On https://translate.wordpress.org, the {} placeholders in the translation strings are replaced with ### ### placeholders. Then, we replace them back when converting to locale usable by Nuxt app.

However, some placeholders were changed to use an irregular number of #, or to have empty placeholders. We have a hot-fix in the code to replace the extra # or empty {} pairs. We also log that the invalid values were found, and link to this issue in the hot-fix.

When all of the incorrect placeholders are replaced on https://translate.wordpress.org, we can close this issue.

Additional context

Similar issue for kebab-cased keys: #2438