I’ve been translating FarmOS for Norwegian, and general user interface is quite complete now.
But the quantity, log and resource types will not show their translation.
They are translated here: …/admin/config/regional/config-translation/log_type
Did anyone have any luck with this?
I’m hosted on Farmier.
I tried creating and loggingin in with a new user. Same result there.
Another issue I have:
E.g.
Norwegian translation of e.g. “Activity logs” is “Aktivitetslogger”
I find this hard to achieve since Activity and logs are two different terms.
Someone with a tip on this?
@pat Are they translated now? I just enabled another module (config_update_ui so I could check your config entities) and maybe that did it…
I’m noticing that when modules get enabled, they trigger something in the translations to get updated… so this might explain what we’re seeing. Perhaps clearing the cache is not enough, and another specific language update function needs to run to update certain things (like menu).
locale:update Imports the available translation updates.
I wonder if running this would refresh the menus to pick up new translations. Maybe worth a try… let me know if you translate anything else and we can test to see if it does the trick.
Ok interesting! I’d like to confirm whether or not the drush locale:update command will do the same thing. Let me know if you translate anything else in the menu, and I can try running that to see if it fixes it.
Thanks @pat - What resource type did you translate, so I can check myself to see if this works… I’ll confirm that it is in English, then run drush locale:update, and check again to see if it was translated afterwards.
Hmm I ran drush locale:update and it seems to have done the opposite of what I wanted… ALL of the menu items under Records > Assets are in English now.
This is what I saw when I ran the command:
> [notice] Translation file not found: https://ftp.drupal.org/files/translations/all/admin_toolbar/admin_toolbar-8.x-2.5.nb.po.
> [notice] Checked nb translation for admin_toolbar.
> [notice] Checked nb translation for consumers.
> [notice] Checked nb translation for date_popup.
> [notice] Checked nb translation for entity_browser.
> [notice] Checked nb translation for farm_map_google.
> [notice] Checked nb translation for fraction.
> [notice] Checked nb translation for geofield.
> [notice] Checked nb translation for inline_entity_form.
> [notice] Checked nb translation for inspire_tree.
> [notice] Checked nb translation for jsonapi_schema.
> [notice] Checked nb translation for role_delegation.
> [notice] Checked nb translation for simple_oauth.
> [notice] Checked nb translation for smtp.
> [notice] Checked nb translation for state_machine.
> [notice] Checked nb translation for subrequests.
> [notice] Checked nb translation for token.
> [notice] Checked nb translation for views_geojson.
> [notice] Checked nb translation for gin.
> [notice] Checked nb translation for config_update.
> [notice] Checked nb translation for csv_serialization.
> [notice] Checked nb translation for entity.
> [notice] Checked nb translation for entity_reference_integrity.
> [notice] Checked nb translation for entity_reference_revisions.
> [notice] Checked nb translation for entity_reference_validators.
> [notice] Checked nb translation for exif_orientation.
> [notice] Translation file not found: https://ftp.drupal.org/files/translations/all/farm_nrcs/farm_nrcs-2.0.1.nb.po.
> [notice] Checked nb translation for farm_nrcs.
> [notice] Checked nb translation for jsonapi_extras.
> [notice] Checked nb translation for log.
> [notice] Checked nb translation for drupal.
> [notice] Downloaded nb translation for drupal.
> [notice] Importing nb translation for drupal. (0%).
> [notice] Importing nb translation for drupal. (1%).
> [notice] Importing nb translation for drupal. (1%).
> [notice] Importing nb translation for drupal. (2%).
> [notice] Importing nb translation for drupal. (2%).
> [notice] Importing nb translation for drupal. (3%).
> [notice] Importing nb translation for drupal. (4%).
> [notice] Importing nb translation for drupal. (5%).
> [notice] Importing nb translation for drupal. (6%).
> [notice] Importing nb translation for drupal. (7%).
> [notice] Importing nb translation for drupal. (9%).
> [notice] Importing nb translation for drupal. (10%).
> [notice] Importing nb translation for drupal. (11%).
> [notice] Importing nb translation for drupal. (13%).
> [notice] Importing nb translation for drupal. (15%).
> [notice] Importing nb translation for drupal. (16%).
> [notice] Importing nb translation for drupal. (18%).
> [notice] Importing nb translation for drupal. (19%).
> [notice] Importing nb translation for drupal. (20%).
> [notice] Importing nb translation for drupal. (22%).
> [notice] Importing nb translation for drupal. (23%).
> [notice] Importing nb translation for drupal. (25%).
> [notice] Importing nb translation for drupal. (27%).
> [notice] Importing nb translation for drupal. (28%).
> [notice] Importing nb translation for drupal. (30%).
> [notice] Importing nb translation for drupal. (32%).
> [notice] Importing nb translation for drupal. (34%).
> [notice] Importing nb translation for drupal. (35%).
> [notice] Importing nb translation for drupal. (36%).
> [notice] Importing nb translation for drupal. (37%).
> [notice] Importing nb translation for drupal. (40%).
> [notice] Importing nb translation for drupal. (42%).
> [notice] Importing nb translation for drupal. (44%).
> [notice] Importing nb translation for drupal. (47%).
> [notice] Importing nb translation for drupal. (50%).
> [notice] Importing nb translation for drupal. (57%).
> [notice] Importing nb translation for drupal. (63%).
> [notice] Importing nb translation for drupal. (66%).
> [notice] Importing nb translation for drupal. (69%).
> [notice] Importing nb translation for drupal. (71%).
> [notice] Importing nb translation for drupal. (73%).
> [notice] Importing nb translation for drupal. (76%).
> [notice] Importing nb translation for drupal. (78%).
> [notice] Importing nb translation for drupal. (80%).
> [notice] Importing nb translation for drupal. (83%).
> [notice] Importing nb translation for drupal. (87%).
> [notice] Importing nb translation for drupal. (91%).
> [notice] Importing nb translation for drupal. (94%).
> [error] Import of string "Kunne ikke koble til serveren. Serveren gir følgende melding: <p class = "error">@message</p>. For mer hjelp med å legge til eller oppdatere koden på serveren din, se <a href=":handbook_url">håndboka</a>." was skipped because of disallowed or malformed HTML.
> [notice] Importing nb translation for drupal. (95%).
> [notice] Imported nb translation for drupal.
> [notice] Translations imported: 32 added, 9795 updated, 0 removed.
> [warning] 1 disallowed HTML string(s) in files: translations://drupal-9.3.3.nb.po.
> [warning] Message: One translation string was skipped because of disallowed or malformed HTML.
> See the log for details.
>
> [notice] Message: One translation file imported. /32/ translations were added, /9795/
> translations were updated and /0/ translations were removed.
>
After that, the menus were unchanged, BUT the title at the top of /assets/land changed from " Landområder-- ressurs" to “Landområder++ ressurs”.
So then I cleared the cache with drush cr - and the menus all changed to English.
Re-running drush locale:update again after that results in:
> [warning] No configuration objects have been updated.
> [notice] Message: No configuration objects have been updated.
>
FYI pasting a link to a Slack conversation with Drupal core maintainer Gabor regarding exporting *.potx files from localize.drupal.org for future reference: Slack