From f442a665c835a23e32f1324db213a59080e98819 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 27 May 2017 17:36:02 +0100 Subject: [PATCH] fix more i18n punctuation fails --- scripts/check-i18n.pl | 5 ++++- scripts/fix-i18n.pl | 2 ++ src/TextForEvent.js | 2 +- src/i18n/strings/da.json | 2 +- src/i18n/strings/de_DE.json | 4 ++-- src/i18n/strings/en_EN.json | 4 ++-- src/i18n/strings/fr.json | 4 ++-- src/i18n/strings/pt.json | 4 ++-- src/i18n/strings/pt_BR.json | 4 ++-- src/i18n/strings/ru.json | 4 ++-- 10 files changed, 20 insertions(+), 15 deletions(-) diff --git a/scripts/check-i18n.pl b/scripts/check-i18n.pl index ff25955bdc..b415108b96 100755 --- a/scripts/check-i18n.pl +++ b/scripts/check-i18n.pl @@ -38,6 +38,8 @@ foreach my $tuple (@$src_strings) { } } +#exit; + opendir(DIR, $i18ndir) || die $!; my @files = readdir(DIR); closedir(DIR); @@ -81,7 +83,8 @@ sub read_i18n { while() { if ($_ =~ m/^(\s+)"(.*?)"(: *)"(.*?)"(,?)$/) { my ($indent, $src, $colon, $dst, $comma) = ($1, $2, $3, $4, $5); - + $src =~ s/\\"/"/g; + $dst =~ s/\\"/"/g; $map->{$src} = $dst; } } diff --git a/scripts/fix-i18n.pl b/scripts/fix-i18n.pl index 5002abd55d..8f23673561 100755 --- a/scripts/fix-i18n.pl +++ b/scripts/fix-i18n.pl @@ -51,6 +51,8 @@ EOT my $sub = 0; if ($_ =~ m/^(\s+)"(.*?)"(: *)"(.*?)"(,?)$/) { my ($indent, $src, $colon, $dst, $comma) = ($1, $2, $3, $4, $5); + $src =~ s/\\"/"/g; + $dst =~ s/\\"/"/g; foreach my $fixup (@{$::fixups}) { my $dotless_fixup = substr($fixup, 0, -1); diff --git a/src/TextForEvent.js b/src/TextForEvent.js index 169868e812..6438a9a1ad 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -179,7 +179,7 @@ function textForHistoryVisibilityEvent(event) { text += _t('anyone') + '.'; } else { - text += ' ' + _t('unknown') + ' (' + vis + ')'; + text += ' ' + _t('unknown') + ' (' + vis + ').'; } return text; } diff --git a/src/i18n/strings/da.json b/src/i18n/strings/da.json index af6f0bb0fe..60904eb4af 100644 --- a/src/i18n/strings/da.json +++ b/src/i18n/strings/da.json @@ -64,7 +64,7 @@ "and": "og", "An email has been sent to": "En e-mail blev sendt til", "answered the call.": "svarede på kaldet", - "anyone.": "alle", + "anyone": "alle", "Anyone who knows the room's link, apart from guests": "Alle der kender link til rummet, bortset fra gæster", "Anyone who knows the room's link, including guests": "Alle der kender link til rummet, inklusiv gæster", "Are you sure you want to leave the room?": "Er du sikker på du vil forlade rummet?", diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 4f2db07633..63c0c5a58e 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -59,7 +59,7 @@ "all room members, from the point they joined": "Alle Raum-Mitglieder - seitdem sie beigetreten sind", "and": "und", "An email has been sent to": "Eine E-Mail wurde gesendet an", - "anyone.": "Jeder", + "anyone": "Jeder", "Anyone who knows the room's link, apart from guests": "Jeder der den Raum-Link kennt - abgesehen von Gästen", "Anyone who knows the room's link, including guests": "Jeder der den Raum-Link kennt - auch Gäste", "Are you sure you want to leave the room?": "Bist du sicher, dass du den Raum verlassen willst?", @@ -358,7 +358,7 @@ "%(senderName)s changed their profile picture.": "%(senderName)s änderte das Profilbild.", "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s änderte das Berechtigungslevel von %(powerLevelDiffText)s.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s änderte den Raumnamen zu %(roomName)s.", - "%(senderDisplayName)s changed the topic to \"%(topic)s\"": "%(senderDisplayName)s änderte das Thema zu \"%(topic)s\"", + "%(senderDisplayName)s changed the topic to "%(topic)s".": "%(senderDisplayName)s änderte das Thema zu "%(topic)s".", "/ddg is not a command": "/ddg ist kein Kommando", "%(senderName)s ended the call.": "%(senderName)s beendete den Anruf.", "Failed to lookup current room": "Aktuellen Raum nachzuschlagen schlug fehl", diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index ee4e439b91..0870a6d574 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -151,7 +151,7 @@ "An email has been sent to": "An email has been sent to", "A new password must be entered.": "A new password must be entered.", "%(senderName)s answered the call.": "%(senderName)s answered the call.", - "anyone.": "anyone", + "anyone": "anyone", "An error has occurred.": "An error has occurred.", "Anyone who knows the room's link, apart from guests": "Anyone who knows the room's link, apart from guests", "Anyone who knows the room's link, including guests": "Anyone who knows the room's link, including guests", @@ -176,7 +176,7 @@ "%(senderName)s changed their profile picture.": "%(senderName)s changed their profile picture.", "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s changed the power level of %(powerLevelDiffText)s.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s changed the room name to %(roomName)s.", - "%(senderDisplayName)s changed the topic to \"%(topic)s\"": "%(senderDisplayName)s changed the topic to \"%(topic)s\"", + "%(senderDisplayName)s changed the topic to "%(topic)s".": "%(senderDisplayName)s changed the topic to "%(topic)s".", "Changes to who can read history will only apply to future messages in this room": "Changes to who can read history will only apply to future messages in this room", "Changes your display nickname": "Changes your display nickname", "changing room on a RoomView is not supported": "changing room on a RoomView is not supported", diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json index b8ed7684be..94cf453c65 100644 --- a/src/i18n/strings/fr.json +++ b/src/i18n/strings/fr.json @@ -119,7 +119,7 @@ "zh-sg": "Chinese (Singapore)", "zh-tw": "Chinese (Taiwan)", "zu": "Zulu", - "anyone.": "anyone", + "anyone": "anyone", "Direct Chat": "Conversation Directe", "Direct chats": "Conversations directes", "Disable inline URL previews by default": "Désactiver l’aperçu des URLs", @@ -219,7 +219,7 @@ "%(senderName)s changed their profile picture.": "%(senderName)s a changé sa photo de profil.", "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s a changé le niveau de pouvoir de %(powerLevelDiffText)s.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s a changé le nom du salon en %(roomName)s.", - "%(senderDisplayName)s changed the topic to \"%(topic)s\"": "%(senderDisplayName)s a changé le sujet du salon en \"%(topic)s\"", + "%(senderDisplayName)s changed the topic to "%(topic)s".": "%(senderDisplayName)s a changé le sujet du salon en "%(topic)s".", "Changes to who can read history will only apply to future messages in this room": "Les changements de visibilité de l’historique de ce salon ne s’appliquent qu’aux messages futurs", "Changes your display nickname": "Change votre nom d'affichage", "Claimed Ed25519 fingerprint key": "Clé empreinte Ed25519 revendiquée", diff --git a/src/i18n/strings/pt.json b/src/i18n/strings/pt.json index 9afd58b979..57dbc3ae25 100644 --- a/src/i18n/strings/pt.json +++ b/src/i18n/strings/pt.json @@ -312,14 +312,14 @@ "%(names)s and one other are typing": "%(names)s e uma outra pessoa estão escrevendo", "%(names)s and %(count)s others are typing": "%(names)s e %(count)s outras pessoas estão escrevendo", "%(senderName)s answered the call.": "%(senderName)s atendeu à chamada.", - "anyone.": "qualquer pessoa", + "anyone": "qualquer pessoa", "%(senderName)s banned %(targetName)s.": "%(senderName)s removeu %(targetName)s da sala.", "Call Timeout": "Tempo esgotado. Chamada encerrada", "%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s mudou seu nome público de %(oldDisplayName)s para %(displayName)s.", "%(senderName)s changed their profile picture.": "%(senderName)s alterou sua imagem de perfil.", "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s alterou o nível de permissões de %(powerLevelDiffText)s.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s alterou o nome da sala para %(roomName)s.", - "%(senderDisplayName)s changed the topic to \"%(topic)s\"": "%(senderDisplayName)s alterou o tópico para \"%(topic)s\"", + "%(senderDisplayName)s changed the topic to "%(topic)s".": "%(senderDisplayName)s alterou o tópico para "%(topic)s".", "click to reveal": "clique para ver", "Conference call failed": "Chamada de conferência falhou", "Conference calling is in development and may not be reliable": "Chamadas de conferência estão em desenvolvimento e portanto podem não funcionar", diff --git a/src/i18n/strings/pt_BR.json b/src/i18n/strings/pt_BR.json index 7c1cdddd93..e2cd527ee0 100644 --- a/src/i18n/strings/pt_BR.json +++ b/src/i18n/strings/pt_BR.json @@ -36,7 +36,7 @@ "changed their profile picture": "alterou sua foto de perfil", "changed the power level of": "mudou o nível de permissões de", "changed the room name to": "mudou o nome da sala para", - "%(senderDisplayName)s changed the topic to \"%(topic)s\"": "%(senderDisplayName)s mudou o tópico para \"%(topic)s\"", + "%(senderDisplayName)s changed the topic to "%(topic)s".": "%(senderDisplayName)s mudou o tópico para "%(topic)s".", "Changes to who can read history will only apply to future messages in this room": "As mudanças sobre quem pode ler o histórico da sala só serão aplicadas às mensagens futuras nesta sala", "Changes your display nickname": "Troca o seu apelido", "Claimed Ed25519 fingerprint key": "Chave reivindicada da Impressão Digital Ed25519", @@ -317,7 +317,7 @@ "%(names)s and one other are typing": "%(names)s e uma outra pessoa estão escrevendo", "%(names)s and %(count)s others are typing": "%(names)s e %(count)s outras pessoas estão escrevendo", "%(senderName)s answered the call.": "%(senderName)s atendeu à chamada.", - "anyone.": "qualquer pessoa", + "anyone": "qualquer pessoa", "%(senderName)s banned %(targetName)s.": "%(senderName)s removeu %(targetName)s da sala.", "Call Timeout": "Tempo esgotado. Chamada encerrada", "%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s mudou seu nome público de %(oldDisplayName)s para %(displayName)s.", diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json index b66c5c304b..125defd9a3 100644 --- a/src/i18n/strings/ru.json +++ b/src/i18n/strings/ru.json @@ -16,7 +16,7 @@ "An email has been sent to": "Email был отправлен", "A new password must be entered.": "Введите новый пароль.", "answered the call.": "принятый звонок.", - "anyone.": "кто угодно", + "anyone": "кто угодно", "Anyone who knows the room's link, apart from guests": "Любой, кто знает ссылку на комнату, кроме гостей", "Anyone who knows the room's link, including guests": "Любой, кто знает ссылку комнаты, включая гостей", "Are you sure you want to reject the invitation?": "Вы уверены что вы хотите отклонить приглашение?", @@ -231,7 +231,7 @@ "%(senderName)s changed their profile picture.": "%(senderName)s измененное ихнее фото профиля.", "%(senderName)s changed the power level of %(powerLevelDiffText)s.": "%(senderName)s уровень мощности изменен на %(powerLevelDiffText)s.", "%(senderDisplayName)s changed the room name to %(roomName)s.": "%(senderDisplayName)s имя комнаты измененно на %(roomName)s.", - "%(senderDisplayName)s changed the topic to \"%(topic)s\"": "%(senderDisplayName)s измененная тема на %(topic)s", + "%(senderDisplayName)s changed the topic to "%(topic)s".": "%(senderDisplayName)s измененная тема на %(topic)s.", "Conference call failed": "Конференц-вызов прервался", "Conference calling is in development and may not be reliable": "Конференц-вызов находится в процессе и может не быть надежным", "Conference calls are not supported in encrypted rooms": "Конференц-вызовы не поддерживаются в зашифрованных комнатах",