From cf4be831f94451469ce92797738970acbb9dc5a7 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 15 Sep 2022 15:07:10 +0200 Subject: [PATCH] Make admin settings translatable Signed-off-by: Marcel Klehr --- src/components/ViewAdmin.vue | 102 ++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/src/components/ViewAdmin.vue b/src/components/ViewAdmin.vue index f731430bf..b8a848533 100644 --- a/src/components/ViewAdmin.vue +++ b/src/components/ViewAdmin.vue @@ -11,79 +11,79 @@

- None of the tagging options below are currently selected. The app will currently do nothing. + {{ t('recognize', 'None of the tagging options below are currently selected. The app will currently do nothing.') }}

- Enable face recognition (based on contact pictures in the Contacts app) + {{ t('recognize', 'Enable face recognition (groups pictures by people that appear in them in the photos app)') }}

- Enable object recognition (e.g. food, vehicles, landscapes) + {{ t('recognize', 'Enable object recognition (e.g. food, vehicles, landscapes)') }}

@@ -91,14 +91,14 @@ type="switch" :disabled="!Boolean(settings['imagenet.enabled'])" @update:checked="onChange"> - Enable landmark recognition (e.g. Eiffel Tower, Golden Gate Bridge) + {{ t('recognize', 'Enable landmark recognition (e.g. Eiffel Tower, Golden Gate Bridge)') }}

- Enable music genre recognition (e.g. pop, rock, folk, metal, new age) + {{ t('recognize', 'Enable music genre recognition (e.g. pop, rock, folk, metal, new age)') }}

@@ -108,36 +108,36 @@ type="switch" :disabled="platform !== 'x86_64' || settings['tensorflow.purejs']" @update:checked="onChange"> - Enable human action recognition (e.g. arm wrestling, dribbling basketball, hula hooping) + {{ t('recognize', 'Enable human action recognition (e.g. arm wrestling, dribbling basketball, hula hooping)') }}

-

Click the below button to remove all tags from all files that have been classified so far.

+

{{ t('recognize', 'Click the below button to remove all tags from all files that have been classified so far.') }}

 

-

Click the below button to rescan all files in this instance and add them to the classifier queues.

+

{{ t('recognize', 'Click the below button to rescan all files in this instance and add them to the classifier queues.') }}

-

To trigger a full classification run manually, run the following command on the terminal.

+

{{ t('recognize', 'To trigger a full classification run manually, run the following command on the terminal.') }}

occ recognize:recrawl

 

-

To download all models preliminary to executing the classification jobs, run the following command on the terminal.

+

{{ t('recognize', 'To download all models preliminary to executing the classification jobs, run the following command on the terminal.') }}

occ recognize:download-models

 

-

You can reset the tags of all files that have been previously classified by recognize with the following command:

+

{{ t('recognize', 'You can reset the tags of all files that have been previously classified by recognize with the following command:') }}

occ recognize:reset-tags

 

-

You can delete all tags that no longer have any files associated with them with the following command:

+

{{ t('recognize', 'You can delete all tags that no longer have any files associated with them with the following command:') }}

occ recognize:cleanup-tags
-

By default all available CPU cores will be used which may put your system under considerable load. To avoid this, you can limit the amount of CPU Cores used.

+

{{ t('recognize', 'By default all available CPU cores will be used which may put your system under considerable load. To avoid this, you can limit the amount of CPU Cores used.') }}

-     Checking CPU +     {{ t('recognize', 'Checking CPU') }}

- Your machine supports native TensorFlow operation, you do not need WASM mode. -

-

- Your machine does not support native TensorFlow operation, because {{ pureJSReasons }}. WASM mode is recommended. + {{ t('recognize', 'Your machine supports native TensorFlow operation, you do not need WASM mode.') }}

+

- Enable WASM mode + {{ t('recognize', 'Enable WASM mode') }}

- If the shipped Node.js binary doesn't work on your system for some reason you can set the path to a custom node.js binary. - Currently supported is Node v14.17 and newer v14 releases. + {{ t('recognize', 'If the shipped Node.js binary doesn\'t work on your system for some reason you can set the path to a custom node.js binary. Currently supported is Node v14.17 and newer v14 releases.') }}

@@ -212,15 +218,15 @@ export default { pureJSReasons() { const reasons = [] if (!this.avx) { - reasons.push('it does not support AVX instructions') + reasons.push(this.t('recognize', 'Your server does not support AVX instructions')) } if (this.platform !== 'x86_64') { - reasons.push('it doesn\'t have not an x86 64bit CPU') + reasons.push(this.t('recognize', 'Your server doesn\'t have an x86 64bit CPU')) } if (this.musl) { - reasons.push('it uses musl libc') + reasons.push(this.t('recognize', 'Your server uses musl libc')) } - return reasons.join(' and ') + return reasons }, },