From a080ae54cae629c2df442c5ad5fe04ad2a0d8487 Mon Sep 17 00:00:00 2001
From: Konrad Mohrfeldt <km@roko.li>
Date: Fri, 31 Jan 2025 02:13:50 +0100
Subject: [PATCH] fix: decouple licensing translations from image

---
 src/components/license/AAttributionEditor.vue |  6 +++---
 src/i18n/de.js                                | 16 +++++++++++-----
 src/i18n/en.js                                | 12 +++++++++---
 3 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/src/components/license/AAttributionEditor.vue b/src/components/license/AAttributionEditor.vue
index 75198e3..1913a90 100644
--- a/src/components/license/AAttributionEditor.vue
+++ b/src/components/license/AAttributionEditor.vue
@@ -1,7 +1,7 @@
 <template>
   <FormGroup
     v-slot="controlAttributes"
-    :label="t('image.license')"
+    :label="t('licensing.fields.license')"
     :errors="errors.forField('licenseId')"
   >
     <select v-model="licenseId" class="form-control" required v-bind="controlAttributes">
@@ -18,7 +18,7 @@
 
   <FormGroup
     v-slot="controlAttributes"
-    :label="t('image.credits')"
+    :label="t('licensing.fields.credits')"
     :errors="[...errors.forField('credits'), needsAuthorError]"
   >
     <input
@@ -44,7 +44,7 @@
         :required="selectedLicense?.requiresExpressPermissionForPublication"
         v-bind="controlAttributes"
       />
-      {{ t('image.isUseExplicitlyGrantedByAuthor') }}
+      {{ t('licensing.fields.isUseExplicitlyGrantedByAuthor') }}
     </label>
   </FormGroup>
 </template>
diff --git a/src/i18n/de.js b/src/i18n/de.js
index 9f90092..c748986 100644
--- a/src/i18n/de.js
+++ b/src/i18n/de.js
@@ -663,6 +663,15 @@ export default {
     },
   },
 
+  licensing: {
+    singular: 'Lizenzierung',
+    fields: {
+      license: 'Lizenz',
+      credits: 'Urheber:in',
+      isUseExplicitlyGrantedByAuthor: 'Urheber:in erlaubt Veröffentlichung',
+    },
+  },
+
   imageManipulation: {
     processingImage: 'Das Bild wird geladen.',
     aspectRatioError: 'Bitte schneide das Bild auf das erforderliche Seitenverhältnis zu.',
@@ -676,18 +685,15 @@ export default {
 
   image: {
     altText: 'Alternativtext (für Screenreader)',
-    license: 'Lizenz',
-    credits: 'Bildnachweis / Urheber:in',
-    isUseExplicitlyGrantedByAuthor: 'Autor:in erlaubt Veröffentlichung',
   },
 
   license: {
     moreAbout: 'Mehr zu dieser Lizenz...',
     validation: {
       requiresExpressPermissionForPublication:
-        'Die Lizenz erfordert eine explizite Zustimmung zur Veröffentlichung seitens des:der Autor:in.',
+        'Die Lizenz erfordert eine explizite Zustimmung zur Veröffentlichung seitens des:der Urheber:in.',
       requiresCredits:
-        'Die Lizenz erfordert die Nennung des:der Autor:in. Bitte gib deren Namen an.',
+        'Die Lizenz erfordert die Nennung des:der Urheber:in. Bitte gib deren Namen an.',
     },
   },
 
diff --git a/src/i18n/en.js b/src/i18n/en.js
index fe5e127..a2ba66d 100644
--- a/src/i18n/en.js
+++ b/src/i18n/en.js
@@ -660,6 +660,15 @@ export default {
     },
   },
 
+  licensing: {
+    singular: 'Licensing',
+    fields: {
+      license: 'License',
+      credits: 'Author',
+      isUseExplicitlyGrantedByAuthor: 'Use was explicitly granted by author',
+    },
+  },
+
   imageManipulation: {
     processingImage: 'The image is being loaded',
     aspectRatioError: 'Please crop the image to the required aspect ratio.',
@@ -673,9 +682,6 @@ export default {
 
   image: {
     altText: 'Alternative Text (for screen readers)',
-    license: 'License',
-    credits: 'Credits / Author',
-    isUseExplicitlyGrantedByAuthor: 'Use was explicitly granted by author',
   },
 
   license: {
-- 
GitLab