Skip to content

Commit

Permalink
Place variable interpolations inside i18n strings where appropriate (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed May 1, 2022
1 parent 4a10968 commit 11af496
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
8 changes: 4 additions & 4 deletions frontend/src/i18n/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
"preferred-label-choice": "Choose a preferred label before saving.",
"save": "Save",
"delete": "Delete",
"annotation": "Annotation",
"identified-as": "identified as",
"item": "item",
"annotation-serial-identified": "Annotation {{annotationSerial}}, identified as item {{itemSerial}}",
"annotation-serial-tag-only": "Annotation {{annotationSerial}}",
"item-serial": "Item {{itemSerial}}",
"annotation-verification": "This annotation needs to be verified.",
"item-properties": "Item properties",
"related-items-title": "Related items",
Expand All @@ -112,7 +112,7 @@
"new": "New",
"annotation-metadata": "Annotation metadata",
"edit-external-resources": "Edit external resources",
"for-item": "For item",
"for-item-serial": "For item/{{itemSerial}}",
"edit-related-items": "Edit related items",
"no-details": "No further details",
"search-results": "Search Results",
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/i18n/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
"preferred-label-choice": "Choose a preferred label before saving.",
"save": "Save",
"delete": "Delete",
"annotation": "Annotation",
"identified-as": "identified as",
"item": "item",
"annotation-serial-identified": "Annotation {{annotationSerial}}, identified as item {{itemSerial}}",
"annotation-serial-tag-only": "Annotation {{annotationSerial}}",
"item-serial": "Item {{itemSerial}}",
"annotation-verification": "This annotation needs to be verified.",
"item-properties": "Item properties",
"related-items-title": "Related items",
Expand All @@ -112,7 +112,7 @@
"new": "New",
"annotation-metadata": "Annotation metadata",
"edit-external-resources": "Edit external resources",
"for-item": "For item",
"for-item-serial": "For item/{{itemSerial}}",
"edit-related-items": "Edit related items",
"no-details": "No further details",
"search-results": "Search Results",
Expand Down
19 changes: 13 additions & 6 deletions frontend/src/panel-annotation/annotation-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
<header>
<aside>{{! label view will be inserted here }}</aside>
<h3 class="title is-3">{{label}}</h3>
<h6 class="subtitle is-6">{{#if annotationSerial }}
{{#i18n 'annotation'}}Annotation{{/i18n}} {{ annotationSerial }}{{#if itemSerial}},
{{#i18n 'identified-as'}}identified as{{/i18n}}
{{/if}}{{/if}}{{#if itemSerial }}
{{#i18n 'item'}}item{{/i18n}}/{{ itemSerial }}
{{/if}}</h6>
<h6 class="subtitle is-6">
{{#if annotationSerial }}
{{#if itemSerial}}
{{#i18n 'annotation-serial-identified'}}Annotation {{annotationSerial}}, identified as item {{itemSerial}}{{/i18n}}
{{else}}
{{#i18n 'annotation-serial-tag-only'}}Annotation {{annotationSerial}}{{/i18n}}
{{/if}}
{{else}}
{{#if itemSerial}}
{{#i18n 'item-serial'}}Item {{itemSerial}}{{/i18n}}
{{/if}}
{{/if}}
</h6>
{{#if needsVerification}}
<h6 class="title is-6">
{{#i18n 'annotation-verification'}}This annotation needs to be verified.{{/i18n}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="panel-header">
<header>
<h3 class="title is-3">{{#i18n 'external-resources-title'}}External resources{{/i18n}}</h3>
<h6 class="subtitle is-6">{{#i18n 'for-item'}}For item{{/i18n}}/{{ itemSerial }}</h6>
<h6 class="subtitle is-6">{{#i18n 'for-item-serial'}}For item/{{itemSerial}}{{/i18n}}</h6>
</header>
</div>
<div class="panel-content external">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="panel-header">
<header>
<h3 class="title is-3">{{#i18n 'related-items-title'}}Related items{{/i18n}}</h3>
<h6 class="subtitle is-6">{{#i18n 'for-item'}}For item{{/i18n}}/{{ itemSerial }}</h6>
<h6 class="subtitle is-6">{{#i18n 'for-item-serial'}}For item/{{itemSerial}}{{/i18n}}</h6>
</header>
</div>
<div class="panel-content relations"></div>
Expand Down

0 comments on commit 11af496

Please sign in to comment.