Skip to content

Commit

Permalink
localize labels
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Jun 22, 2024
1 parent 233da78 commit 99a527c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frontend/src/components/TrustDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@

<transition enter-active-class="transition ease-out duration-100" enter-from-class="transform opacity-0 scale-95" enter-to-class="transform opacity-100 scale-100" leave-active-class="transition ease-in duration-75" leave-from-class="transform opacity-100 scale-100" leave-to-class="transform opacity-0 scale-95">
<PopoverPanel class="absolute right-0 z-10 mt-2 origin-top-right rounded-md bg-white p-4 shadow-2xl ring-1 ring-black ring-opacity-5 focus:outline-none">
<p class="text-sm">Trust Level {{ trustLevel }}</p>
<button v-if="trustLevel !== 0 && trustedUser.ecdhPublicKey && trustedUser.ecdsaPublicKey" @click="showSignUserKeysDialog()" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary text-base font-medium text-white hover:bg-primary-d1 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary sm:ml-3 sm:w-auto sm:text-sm">
Sign
<p v-if="trustLevel === -1" class="text-sm mb-2">{{ t('trustDetails.trustLevel', [ n(0, 'percent')]) }}</p>
<p v-if="trustLevel > 0" class="text-sm mb-2">{{ t('trustDetails.trustLevel', [ n(1 / trustLevel, 'percent')]) }}</p>
<button v-if="trustLevel !== 0 && trustedUser.ecdhPublicKey && trustedUser.ecdsaPublicKey" @click="showSignUserKeysDialog()" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary text-base font-medium text-white hover:bg-primary-d1 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary sm:w-auto sm:text-sm">
{{ t('trustDetails.showSignDialogBtn') }}
</button>
</PopoverPanel>
</transition>
Expand All @@ -28,7 +29,7 @@ import userdata from '../common/userdata';
import wot from '../common/wot';
import SignUserKeysDialog from './SignUserKeysDialog.vue';
const { t } = useI18n({ useScope: 'global' });
const { t, n } = useI18n({ useScope: 'global' });
const props = defineProps<{
trustedUser: UserDto,
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/i18n/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
"grantPermissionDialog.description": "Tresor-Schlüssel mit neu hinzugefügten Nutzern teilen.",
"grantPermissionDialog.submit": "Berechtigung für {0} Nutzer gewähren",

"trustDetails.trustLevel": "Vertrauenslevel {0}",
"trustDetails.showSignDialogBtn": "Identität prüfen...",

"signUserKeysDialog.title": "{0}s Identität bestätigen",
"signUserKeysDialog.description": "Gib die ersten {0} Zeichen von {1}s Fingerprint ein, um die Authentizität der Public Keys dieses Nutzers zu bestätigen.",
"signUserKeysDialog.submit": "Identität bestätigen",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
"grantPermissionDialog.description": "Share vault keys with newly added users.",
"grantPermissionDialog.submit": "Grant Permission to {0} User(s)",

"trustDetails.trustLevel": "Trust Level {0}",
"trustDetails.showSignDialogBtn": "Check Identity...",

"signUserKeysDialog.title": "Verify {0}'s Identity",
"signUserKeysDialog.description": "Enter the first {0} characters of {1}'s fingerprint in order to confirm the authenticity of their public keys.",
"signUserKeysDialog.submit": "Confirm this User's Identity",
Expand Down

0 comments on commit 99a527c

Please sign in to comment.