mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-24 11:51:32 +00:00
Formatting translation file, changing deploy script to const.
This commit is contained in:
parent
f044459fda
commit
3180491748
4 changed files with 251 additions and 244 deletions
4
README.md
vendored
4
README.md
vendored
|
@ -161,12 +161,13 @@ Lemmy is free, open-source software, meaning no advertising, monetizing, or vent
|
|||
|
||||
If you'd like to add translations, take a look a look at the [English translation file](ui/src/translations/en.ts).
|
||||
|
||||
- Languages supported: English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), Finnish (`fi`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`), Italian (`it`).
|
||||
- Languages supported: Catalan, (`ca`), English (`en`), Chinese (`zh`), Dutch (`nl`), Esperanto (`eo`), Finnish (`fi`), French (`fr`), Spanish (`es`), Swedish (`sv`), German (`de`), Russian (`ru`), Italian (`it`).
|
||||
|
||||
<!-- translations -->
|
||||
|
||||
lang | done | missing
|
||||
---- | ---- | -------
|
||||
ca | 100% |
|
||||
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% |
|
||||
|
@ -177,7 +178,6 @@ nl | 93% | create_private_message,send_secure_message,send_message,message,messa
|
|||
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
|
||||
ca | 100% |
|
||||
<!-- translationsstop -->
|
||||
|
||||
If you'd like to update this report, run:
|
||||
|
|
2
docker/dev/deploy.sh
vendored
2
docker/dev/deploy.sh
vendored
|
@ -9,7 +9,7 @@ third_semver=$(echo $new_tag | cut -d "." -f 3)
|
|||
|
||||
# Setting the version on the front end
|
||||
cd ../../
|
||||
echo "export let version: string = '$(git describe --tags)';" > "ui/src/version.ts"
|
||||
echo "export const version: string = '$(git describe --tags)';" > "ui/src/version.ts"
|
||||
git add "ui/src/version.ts"
|
||||
# Setting the version on the backend
|
||||
echo "pub const VERSION: &str = \"$(git describe --tags)\";" > "server/src/version.rs"
|
||||
|
|
27
ui/src/translations/ca.ts
vendored
27
ui/src/translations/ca.ts
vendored
|
@ -132,7 +132,7 @@ export const ca = {
|
|||
reset_password_mail_sent: 'Enviar correu per a restablir la contrasenya.',
|
||||
password_change: 'Canvi de Contrasenya',
|
||||
new_password: 'Nueva Contrasenya',
|
||||
no_email_setup: "Aquest servidor no ha activat correctament el correu.",
|
||||
no_email_setup: 'Aquest servidor no ha activat correctament el correu.',
|
||||
email: 'Correu electrònic',
|
||||
matrix_user_id: 'Usuari Matricial',
|
||||
private_message_disclaimer:
|
||||
|
@ -198,15 +198,18 @@ export const ca = {
|
|||
couldnt_like_comment: "No s'ha pogut donar m'agrada al comentari.",
|
||||
couldnt_update_comment: "No s'ha pogut actualitzar el comentari.",
|
||||
couldnt_save_comment: "No s'ha pogut guardar el comentari.",
|
||||
no_comment_edit_allowed: "No tens permisos per a editar el comentari.",
|
||||
no_post_edit_allowed: "No tens permisos per a editar la publicació.",
|
||||
no_community_edit_allowed: "No tens permisos per a editar la comunitat.",
|
||||
no_comment_edit_allowed: 'No tens permisos per a editar el comentari.',
|
||||
no_post_edit_allowed: 'No tens permisos per a editar la publicació.',
|
||||
no_community_edit_allowed: 'No tens permisos per a editar la comunitat.',
|
||||
couldnt_find_community: "No s'ha pogut trobar la comunitat.",
|
||||
couldnt_update_community: "No s'ha pogut actualitzar la comunitat.",
|
||||
community_already_exists: 'Aquesta comunitat ja existeix.',
|
||||
community_moderator_already_exists: 'Aquest moderador de la comunitat ja existeix.',
|
||||
community_follower_already_exists: 'Aquest seguidor de la comunitat ja existeix.',
|
||||
community_user_already_banned: 'Aquest usuari de la comunitat ja fou expulsat.',
|
||||
community_moderator_already_exists:
|
||||
'Aquest moderador de la comunitat ja existeix.',
|
||||
community_follower_already_exists:
|
||||
'Aquest seguidor de la comunitat ja existeix.',
|
||||
community_user_already_banned:
|
||||
'Aquest usuari de la comunitat ja fou expulsat.',
|
||||
couldnt_create_post: "No s'ha pogut crear la publicació.",
|
||||
couldnt_like_post: "No s'ha pogut donar m'agrada a la publicació.",
|
||||
couldnt_find_post: "No s'ha pogut trobar la publicació.",
|
||||
|
@ -225,10 +228,12 @@ export const ca = {
|
|||
user_already_exists: "L'usuari ja existeix.",
|
||||
email_already_exists: 'El correu ja és en ús.',
|
||||
couldnt_update_user: "No s'ha pogut actualitzar l'usuari.",
|
||||
system_err_login: 'Error del sistema. Intenti tancar sessió i ingressar de nou.',
|
||||
system_err_login:
|
||||
'Error del sistema. Intenti tancar sessió i ingressar de nou.',
|
||||
couldnt_create_private_message: "No s'ha pogut crear el missatge privat.",
|
||||
no_private_message_edit_allowed: 'Sense permisos per a editar el missatge privat.',
|
||||
couldnt_update_private_message: "No s'ha pogut actualitzar el missatge privat.",
|
||||
no_private_message_edit_allowed:
|
||||
'Sense permisos per a editar el missatge privat.',
|
||||
couldnt_update_private_message:
|
||||
"No s'ha pogut actualitzar el missatge privat.",
|
||||
},
|
||||
};
|
||||
|
8
ui/translation_report.ts
vendored
8
ui/translation_report.ts
vendored
|
@ -13,6 +13,7 @@ import { ca } from './src/translations/ca';
|
|||
import fs from 'fs';
|
||||
|
||||
const files = [
|
||||
{ t: ca, n: 'ca' },
|
||||
{ t: de, n: 'de' },
|
||||
{ t: eo, n: 'eo' },
|
||||
{ t: es, n: 'es' },
|
||||
|
@ -23,7 +24,6 @@ const files = [
|
|||
{ t: ru, n: 'ru' },
|
||||
{ t: sv, n: 'sv' },
|
||||
{ t: zh, n: 'zh' },
|
||||
{ t: ca, n: 'ca' },
|
||||
];
|
||||
const masterKeys = Object.keys(en.translation);
|
||||
|
||||
|
@ -44,12 +44,14 @@ function difference(a: Array<string>, b: Array<string>): Array<string> {
|
|||
const report =
|
||||
'lang | done | missing\n' +
|
||||
'---- | ---- | -------\n' +
|
||||
files.map(file => {
|
||||
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");
|
||||
})
|
||||
.join('\n');
|
||||
|
||||
const alteredReadmeTxt = `${before}${open}\n\n${report}\n${close}${after}`;
|
||||
|
||||
|
|
Loading…
Reference in a new issue