mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Fix extraction of locale from translation files
The `LocaleExtractor` recognizes these kind of files: - `<locale>.yaml` - `<locale>_something.yaml` It does not recognize these files we use: - `js-<locale>.yaml` (locale is extracted as `js-<locale>`) - `<locale>.seeders.yaml` (locale is extracted as `<locale>.seeders`) It's fixed by deleting the `js-` prefix and the `.seeders` suffix from the extracted locale.
This commit is contained in:
@@ -39,7 +39,7 @@ class I18n::Backend::LocaleExtractor
|
||||
|
||||
return if locale.nil?
|
||||
|
||||
locale.tr("js-", "").to_sym
|
||||
locale.delete_prefix("js-").delete_suffix(".seeders").to_sym
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user