Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations #288

Open
Jorc0 opened this issue Apr 11, 2024 · 5 comments
Open

Translations #288

Jorc0 opened this issue Apr 11, 2024 · 5 comments

Comments

@Jorc0
Copy link

Jorc0 commented Apr 11, 2024

Hello i am using Spanish version on statping and im seeing some mistakes, how can i collaborate to fix them?

@Jorc0
Copy link
Author

Jorc0 commented Apr 11, 2024

Created pull request

@Jorc0 Jorc0 closed this as completed Apr 11, 2024
@Jorc0
Copy link
Author

Jorc0 commented Apr 11, 2024

Reopening issue because all text cannot be translated properly
image

@Jorc0 Jorc0 reopened this Apr 11, 2024
@jemand771
Copy link
Member

I think "Main Services" is a user-specified name and part of the demo data

for the first drpodown: you're trying to make it say "servicio http", right?

@Jorc0
Copy link
Author

Jorc0 commented Apr 11, 2024

I think "Main Services" is a user-specified name and part of the demo data

Cool will check

for the first drpodown: you're trying to make it say "servicio http", right?

Yes exactly

@jemand771
Copy link
Member

should be possible like this:

diff --git a/frontend/src/forms/Service.vue b/frontend/src/forms/Service.vue
index a260e106..d81c95f7 100644
--- a/frontend/src/forms/Service.vue
+++ b/frontend/src/forms/Service.vue
@@ -14,14 +14,14 @@
             <label for="service_type" class="col-sm-4 col-form-label">{{ $t('service_type') }}</label>
             <div class="col-sm-8">
                 <select v-model="service.type" @change="updateDefaultValues()" class="form-control" id="service_type">
-                    <option value="http">HTTP {{ $t('service') }}</option>
-                    <option value="tcp">TCP {{ $t('service') }}</option>
-                    <option value="udp">UDP {{ $t('service') }}</option>
+                    <option value="http">{{ $t('service', {type: 'HTTP'}) }}</option>
+                    <option value="tcp">{{ $t('service', {type: 'TCP'}) }}</option>
+                    <option value="udp">{{ $t('service', {type: 'UDP'}) }}</option>
                     <option value="icmp">ICMP Ping</option>
-                    <option value="grpc">gRPC {{ $t('service') }}</option>
-                    <option value="smtp">SMTP {{ $t('service') }}</option>
-                    <option value="imap">IMAP {{ $t('service') }}</option>
-                    <option value="static">Static {{ $t('service') }}</option>
+                    <option value="grpc">{{ $t('service', {type: 'gRPC'}) }}</option>
+                    <option value="smtp">{{ $t('service', {type: 'SMTP'}) }}</option>
+                    <option value="imap">{{ $t('service', {type: 'IMAP'}) }}</option>
+                    <option value="static">{{ $t('service', {type: 'Static'}) }}</option>
                 </select>
                 <small class="form-text text-muted">Use HTTP if you are checking a website or use TCP if you are checking a server</small>
             </div>
diff --git a/frontend/src/languages/spanish.js b/frontend/src/languages/spanish.js
index 09ae1453..f9b93446 100644
--- a/frontend/src/languages/spanish.js
+++ b/frontend/src/languages/spanish.js
@@ -2,7 +2,7 @@ const spanish = {
     settings: "Configuración",
     dashboard: "Salpicadero",
     services: "Servicios",
-    service: "Servicio",
+    service: "Servicio {type}",
     failures: "Fallos",
     users: "Usuarios",
     login: "Iniciar sesión",

I don't have a working build environment here, you can try this if you want to.
note that you'll need to add the {type} to the end of all other translations aswell (since this removes it from the page)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants