From 4a109685b0b6c8a50f3b9237f085d82e5ae56d4b Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Fri, 29 Apr 2022 01:25:01 +0200 Subject: [PATCH] Replace _ by - in i18n keys (#451) The underscore is the context and number separator in i18next. At the time of writing we are not using this anywhere yet. To avoid confusion, use a dash as a word separator. --- .../src/explorer/explorer-event-controller.ts | 10 +- frontend/src/feedback/feedback-template.hbs | 10 +- frontend/src/footer/footer-template.hbs | 2 +- .../forms/ontology-class-picker-template.hbs | 2 +- frontend/src/i18n/en/translation.json | 182 +++++++++--------- frontend/src/i18n/fr/translation.json | 182 +++++++++--------- .../item-edit/allowed-type-list-template.hbs | 4 +- .../item-edit/detected-type-help-template.hbs | 2 +- .../item-edit/linked-item-editor-template.hbs | 4 +- .../src/item-metadata/item-metadata-view.ts | 2 +- frontend/src/landing/landing-template.hbs | 12 +- frontend/src/login/login-template.hbs | 4 +- frontend/src/menu/menu-template.hbs | 18 +- .../src/notfound404/notfound-template.hbs | 4 +- .../src/pagination/pagination-template.hbs | 4 +- .../annotation-list-panel-template.hbs | 4 +- .../annotation-edit-template.hbs | 24 +-- .../panel-annotation/annotation-template.hbs | 20 +- .../src/panel-annotation/annotation-view.ts | 2 +- .../external-resources-edit-view.ts | 2 +- .../external-resources-template.hbs | 4 +- .../related-items-edit-view.ts | 2 +- .../related-items-template.hbs | 4 +- .../search-result-item-template.hbs | 2 +- .../search-result-list-panel.ts | 2 +- .../source-list-panel-template.hbs | 2 +- .../source-list-template.hbs | 2 +- .../panel-source/source-metadata-template.hbs | 6 +- .../src/panel-source/source-metadata-view.ts | 2 +- .../confirm-registration-template.hbs | 14 +- .../registration/registration-template.hbs | 12 +- .../src/search-box/searchbox-template.hbs | 4 +- .../semantic-search-template.hbs | 2 +- frontend/src/snippet/snippet-view.ts | 2 +- frontend/src/toolbar/toolbar-template.hbs | 4 +- .../src/upload/upload-source-template.hbs | 2 +- 36 files changed, 280 insertions(+), 280 deletions(-) diff --git a/frontend/src/explorer/explorer-event-controller.ts b/frontend/src/explorer/explorer-event-controller.ts index f5202a4f..3f101f30 100644 --- a/frontend/src/explorer/explorer-event-controller.ts +++ b/frontend/src/explorer/explorer-event-controller.ts @@ -311,14 +311,14 @@ class ExplorerEventController { landing = false; } const title = `${landing ? 'My' : 'Sample'} ${queryMode}`; - const i18nKey = title.toLowerCase().replace(' ', '_'); + const i18nKey = title.toLowerCase().replace(' ', '-'); const endpoint = `${queryMode}:${landing ? 'user' : 'sample'}`; const collection = new FlatItemCollection(ldChannel.request(endpoint)); const browsePanel = new SearchResultListPanel({ - // i18next.t('my_sources', 'My sources'); - // i18next.t('sample_sources', 'Sample sources'); - // i18next.t('my_items', 'My items'); - // i18next.t('sample_items', 'Sample items'); + // i18next.t('my-sources', 'My sources'); + // i18next.t('sample-sources', 'Sample sources'); + // i18next.t('my-items', 'My items'); + // i18next.t('sample-items', 'Sample items'); title: i18next.t(i18nKey, title), collection, selectable: false, diff --git a/frontend/src/feedback/feedback-template.hbs b/frontend/src/feedback/feedback-template.hbs index 1bcaf11b..bafa9985 100644 --- a/frontend/src/feedback/feedback-template.hbs +++ b/frontend/src/feedback/feedback-template.hbs @@ -3,10 +3,10 @@
{{#if wasSentSuccessfully}}
- +
-

{{#i18n 'thanks_feedback'}}Thank you very much for your feedback, it is highly appreciated!{{/i18n}}

+

{{#i18n 'thanks-feedback'}}Thank you very much for your feedback, it is highly appreciated!{{/i18n}}

@@ -25,7 +25,7 @@ class="input" type="text" name="title" - placeholder="{{#i18n 'about_readit'}}About READ-IT{{/i18n}}" + placeholder="{{#i18n 'about-readit'}}About READ-IT{{/i18n}}" >
@@ -36,14 +36,14 @@ {{#if hasError}} {{/if}} diff --git a/frontend/src/footer/footer-template.hbs b/frontend/src/footer/footer-template.hbs index aa831782..d2f48057 100644 --- a/frontend/src/footer/footer-template.hbs +++ b/frontend/src/footer/footer-template.hbs @@ -1,5 +1,5 @@