From ca1cce35a6edbdabfbef06a3023caf55b6954f57 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 26 Jan 2020 20:31:34 +0100 Subject: [PATCH] ES translation completed & some fixes --- README.md | 23 ++++++----- ui/src/i18next.ts | 2 +- ui/src/translations/es.ts | 82 +++++++++++++++++++++++++++------------ ui/translation_report.ts | 55 ++++++++++++-------------- 4 files changed, 95 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 9728e0a04..af5d433e7 100644 --- a/README.md +++ b/README.md @@ -166,18 +166,17 @@ If you'd like to add translations, take a look a look at the [English translatio lang | done | missing ---- | --- | --- -de | 88% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,docs,message_sent,messages,old_password,matrix_user_id,private_message_disclaimer,send_notifications_to_email,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -eo | 76% | number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -es | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -fi | 100% | -fr | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -it | 84% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,docs,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -nl | 93% | create_private_message,send_secure_message,send_message,message,message_sent,messages,matrix_user_id,private_message_disclaimer,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -ru | 72% | cross_posts,cross_post,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -sv | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -zh | 70% | cross_posts,cross_post,users,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,settings,stickied,delete_account,delete_account_confirm,banned,creator,number_online,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,nsfw,show_nsfw,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message - +---- | ---- | ------- +de | 88% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,docs,message_sent,messages,old_password,matrix_user_id,private_message_disclaimer,send_notifications_to_email,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +eo | 76% | number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +es | 100% | +fi | 100% | +fr | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +it | 84% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,docs,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +nl | 93% | create_private_message,send_secure_message,send_message,message,message_sent,messages,matrix_user_id,private_message_disclaimer,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +ru | 72% | cross_posts,cross_post,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +sv | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +zh | 70% | cross_posts,cross_post,users,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,settings,stickied,delete_account,delete_account_confirm,banned,creator,number_online,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,nsfw,show_nsfw,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message If you'd like to update this report, run: diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index a1fda9077..065d63c84 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -27,7 +27,7 @@ const resources = { fi, }; -const format = (value, format, lng) => format === 'uppercase' ? value.toUpperCase() : value; +const format = (value: any, format: any, lng: any) => format === 'uppercase' ? value.toUpperCase() : value; i18next.init({ debug: false, diff --git a/ui/src/translations/es.ts b/ui/src/translations/es.ts index 6e1faefeb..e8bdc3d07 100644 --- a/ui/src/translations/es.ts +++ b/ui/src/translations/es.ts @@ -1,7 +1,7 @@ export const es = { translation: { post: 'Publicar', - remove_post: 'Remover publicación', + remove_post: 'Eliminar publicación', no_posts: 'Sin publicaciones.', create_a_post: 'Crear una publicación', create_post: 'Crear Publicación', @@ -12,22 +12,29 @@ export const es = { cross_post: 'cross-post', comments: 'Comentarios', number_of_comments: '{{count}} Comentarios', - remove_comment: 'Remover Comentarios', + remove_comment: 'Eliminar Comentarios', communities: 'Comunidades', users: 'Usuarios', create_a_community: 'Crear una comunidad', create_community: 'Crear Comunidad', - remove_community: 'Remover Comunidad', + remove_community: 'Eliminar Comunidad', subscribed_to_communities: 'Suscrito a <1>comunidades', trending_communities: '<1>Comunidades en tendencia', list_of_communities: 'Lista de comunidades', number_of_communities: '{{count}} Comunidades', community_reqs: 'minúsculas, guión bajo, y sin espacios.', + create_private_message: 'Crear Mensaje Privado', + send_secure_message: 'Enviar Mensaje Seguro', + send_message: 'Enviar Mensaje', + message: 'Mensaje', edit: 'editar', reply: 'responder', cancel: 'Cancelar', preview: 'Previsualizar', - upload_image: 'Subir imagen', + upload_image: 'subir imagen', + avatar: 'Avatar', + upload_avatar: 'Subir Avatar', + show_avatars: 'Ver Avatares', formatting_help: 'Ayuda de formato', view_source: 'ver fuente', unlock: 'desbloquear', @@ -35,18 +42,19 @@ export const es = { sticky: 'fijado', unsticky: 'no fijado', link: 'link', - mod: 'Moderador', - mods: 'Moderadores', + archive_link: 'archivar link', + mod: 'moderador', + mods: 'moderadores', moderates: 'Modera', settings: 'Configuración', - remove_as_mod: 'remover como moderador', + remove_as_mod: 'eliminar como moderador', appoint_as_mod: 'designar como moderador', modlog: 'Historial de moderación', admin: 'administrador', admins: 'administradores', - remove_as_admin: 'remover como administrador', + remove_as_admin: 'eliminar como administrador', appoint_as_admin: 'designar como administrador', - remove: 'remover', + remove: 'eliminar', removed: 'removido', locked: 'bloqueado', stickied: 'fijado', @@ -57,19 +65,19 @@ export const es = { deleted: 'eliminado', delete_account: 'Eliminar Cuenta', delete_account_confirm: - 'Peligro: esta acción eliminará permanentemente tu información. ¿Estás seguro?', + 'Aviso: esta acción eliminará permanentemente tu información. Introduce tu contraseña para continuar', restore: 'restaurar', ban: 'expulsar', ban_from_site: 'expulsar del sitio', unban: 'admitir', - unban_from_site: 'admitir al sitio', + unban_from_site: 'admitir en el sitio', banned: 'expulsado', save: 'guardar', unsave: 'descartar', create: 'crear', creator: 'creador', username: 'Nombre de Usuario', - email_or_username: 'Correo electrónico o Nombre de Usuario', + email_or_username: 'Correo o Usuario', number_of_users: '{{count}} Usuarios', number_of_subscribers: '{{count}} Suscriptores', number_of_points: '{{count}} Puntos', @@ -80,8 +88,8 @@ export const es = { subscribers: 'Suscriptores', both: 'Ambos', saved: 'Guardado', - unsubscribe: 'Abandonar comunidad', - subscribe: 'Suscribir', + unsubscribe: 'Desuscribirse', + subscribe: 'Suscribirse', subscribed: 'Suscrito', prev: 'Anterior', next: 'Siguiente', @@ -96,12 +104,16 @@ export const es = { all: 'Todo', top: 'Mejor', api: 'API', + docs: 'Docs', inbox: 'Buzón de entrada', inbox_for: 'Buzón de entrada para <1>{{user}}', mark_all_as_read: 'marcar todo como leído', type: 'Tipo', unread: 'No leído', + replies: 'Respuestas', + mentions: 'Menciones', reply_sent: 'Respuesta enviada', + message_sent: 'Mensaje enviado', search: 'Buscar', overview: 'Resumen', view: 'Vista', @@ -112,11 +124,29 @@ export const es = { notifications_error: 'Notificaciones de escritorio no disponibles en tu navegador. Prueba Firefox o Chrome.', unread_messages: 'Mensajes no leídos', + messages: 'Mensajes', password: 'Contraseña', verify_password: 'Verificar contraseña', + old_password: 'Antigua Password', + forgot_password: 'olvidé mi password', + reset_password_mail_sent: 'Enviar correo para reestablecer la contraseña.', + password_change: 'Cambio de Contraseña', + new_password: 'Nueva Contraseña', + no_email_setup: "Este servidor no ha activado correctamente el correo.", email: 'Correo electrónico', + matrix_user_id: 'Usuario Matricial', + private_message_disclaimer: + 'Aviso: Los mensajes privados en Lemmy no son seguros. Por favor cree una cuenta en <1>Riot.im para mensajeria segura.', + send_notifications_to_email: 'Enviar notificaciones al correo', optional: 'Opcional', expires: 'Expira', + language: 'Idioma', + browser_default: 'Por defecto del navegador', + downvotes_disabled: 'Votos negativos deshabilitados', + enable_downvotes: 'Habilitar votos negativos', + open_registration: 'Abrir registro', + registration_closed: 'Registro cerrado', + enable_nsfw: 'Habilitar NSFW', url: 'URL', body: 'Descripción', copy_suggested_title: 'Copiar el título sugerido: {{title}}', @@ -139,8 +169,10 @@ export const es = { sponsor_message: 'Lemmy es software libre y de <1>código abierto, lo que significa que no tendrá publicidades, monetización, ni capitales emprendedores, nunca. Tus donaciones apoyan directamente el desarrollo a tiempo completo del proyecto. Muchas gracias a las siguientes personas:', support_on_patreon: 'Apoyo en Patreon', + donate_to_lemmy: 'Donar a Lemmy', + donate: 'Donar', general_sponsors: - 'Patrocinadores Generales son aquellos que señaron entre $10 y $39 a Lemmy.', + 'Los Patrocinadores Generales son aquellos que señaron entre $10 y $39 a Lemmy.', crypto: 'Crypto', bitcoin: 'Bitcoin', ethereum: 'Ethereum', @@ -148,7 +180,8 @@ export const es = { code: 'Código', joined: 'Se unió', by: 'por', - to: 'en', + to: 'a', + from: 'desde', transfer_community: 'transferir comunidad', transfer_site: 'transferir sitio', are_you_sure: '¿Estás seguro?', @@ -158,6 +191,7 @@ export const es = { landing_0: 'Lemmy es un <1>agregador de links / alternativa a reddit, con la intención de funcionar en el <2>fediverso.<3>Es alojable por uno mismo (sin necesidad de grandes compañías), tiene actualización en vivo de cadenas de comentarios, y es pequeño (<4>~80kB). Federar con el sistema de redes ActivityPub forma parte de los objetivos del proyecto. <5>Esta es una <6>version beta muy prematura, y actualmente muchas de las características están rotas o faltan. <7>Sugiere nuevas características o reporta errores <8>aquí.<9>Hecho con <10>Rust, <11>Actix, <12>Inferno, <13>Typescript.', not_logged_in: 'No has iniciado sesión.', + logged_in: 'Has iniciado sesión.', community_ban: 'Has sido expulsado de esta comunidad.', site_ban: 'Has sido expulsado del sitio', couldnt_create_comment: 'No se pudo crear el comentario.', @@ -170,12 +204,9 @@ export const es = { couldnt_find_community: 'No se pudo encontrar la comunidad.', couldnt_update_community: 'No se pudo actualizar la comunidad.', community_already_exists: 'Esta comunidad ya existe.', - community_moderator_already_exists: - 'Este moderador de la comunidad ya existe.', - community_follower_already_exists: - 'Este seguidor de la comunidad ya existe.', - community_user_already_banned: - 'Este usuario de la comunidad ya fue expulsado.', + community_moderator_already_exists: 'Este moderador de la comunidad ya existe.', + community_follower_already_exists: 'Este seguidor de la comunidad ya existe.', + community_user_already_banned: 'Este usuario de la comunidad ya fue expulsado.', couldnt_create_post: 'No se pudo crear la publicación.', couldnt_like_post: 'No se pudo gustar la publicación.', couldnt_find_post: 'No se pudo encontrar la publicación.', @@ -192,8 +223,11 @@ export const es = { passwords_dont_match: 'Las contraseñas no coinciden.', admin_already_created: 'Lo sentimos, ya hay un adminisitrador.', user_already_exists: 'El usuario ya existe.', + email_already_exists: 'El correo ya está en uso.', couldnt_update_user: 'No se pudo actualizar el usuario.', - system_err_login: - 'Error del sistema. Intente cerrar sesión e ingresar de nuevo.', + system_err_login: 'Error del sistema. Intente cerrar sesión e ingresar de nuevo.', + couldnt_create_private_message: "No se pudo crear el mensaje privado.", + no_private_message_edit_allowed: 'Sin permisos para editar el mensaje privado.', + couldnt_update_private_message: "No se pudo actualizar el mensaje privado.", }, }; diff --git a/ui/translation_report.ts b/ui/translation_report.ts index fae0359f1..73e03dbb6 100644 --- a/ui/translation_report.ts +++ b/ui/translation_report.ts @@ -11,6 +11,20 @@ import { it } from './src/translations/it'; import { fi } from './src/translations/fi'; import fs from 'fs'; +const files = [ + { t: de, n: 'de' }, + { t: eo, n: 'eo' }, + { t: es, n: 'es' }, + { t: fi, n: 'fi' }, + { t: fr, n: 'fr' }, + { t: it, n: 'it' }, + { t: nl, n: 'nl' }, + { t: ru, n: 'ru' }, + { t: sv, n: 'sv' }, + { t: zh, n: 'zh' }, +]; +const masterKeys = Object.keys(en.translation); + const readmePath = '../README.md'; const open = ''; @@ -21,37 +35,18 @@ const readmeTxt = fs.readFileSync(readmePath, { encoding: 'utf8' }); const before = readmeTxt.split(open)[0]; const after = readmeTxt.split(close)[1]; -const report = buildReport(); +const difference = (a: Array, b: Array): Array => a.filter(x => !b.includes(x)); + +const report = + 'lang | done | missing\n' + + '---- | ---- | -------\n' + + files.map(file => { + const keys = Object.keys(file.t.translation); + const pct: number = (keys.length / masterKeys.length) * 100; + const missing = difference(masterKeys, keys); + return `${file.n} | ${pct.toFixed(0)}% | ${missing}`; + }).join("\n"); const alteredReadmeTxt = `${before}${open}\n\n${report}\n${close}${after}`; fs.writeFileSync(readmePath, alteredReadmeTxt); - -const difference = (a: Array, b: Array): Array => a.filter(x => !b.includes(x)); - -function buildReport(): string { - const files = [ - { t: de, n: 'de' }, - { t: eo, n: 'eo' }, - { t: es, n: 'es' }, - { t: fi, n: 'fi' }, - { t: fr, n: 'fr' }, - { t: it, n: 'it' }, - { t: nl, n: 'nl' }, - { t: ru, n: 'ru' }, - { t: sv, n: 'sv' }, - { t: zh, n: 'zh' }, - ]; - const masterKeys = Object.keys(en.translation); - - const report = 'lang | done | missing\n' + - '--- | --- | ---\n' + - files.map(file => { - const keys = Object.keys(file.t.translation); - const pct: number = (keys.length / masterKeys.length) * 100; - const missing = difference(masterKeys, keys); - return `${file.n} | ${pct.toFixed(0)}% | ${missing}`; - }).join("\n"); - - return report; -}