Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit b4284cf

Browse files
committed
fix up Can't connect to HS i18n with _tJsx
1 parent ad0cbdd commit b4284cf

File tree

12 files changed

+37
-30
lines changed

12 files changed

+37
-30
lines changed

scripts/check-i18n.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ sub read_src_strings {
178178
$src =~ s/"\s*\+\s*"//g;
179179

180180
$file =~ s/^.*\/src/src/;
181-
while ($src =~ /_t\(\s*'(.*?[^\\])'/sg) {
181+
while ($src =~ /_t(?:Jsx)?\(\s*'(.*?[^\\])'/sg) {
182182
my $s = $1;
183183
$s =~ s/\\'/'/g;
184184
push @$strings, [$s, $file];
185185
}
186-
while ($src =~ /_t\(\s*"(.*?[^\\])"/sg) {
186+
while ($src =~ /_t(?:Jsx)?\(\s*"(.*?[^\\])"/sg) {
187187
push @$strings, [$1, $file];
188188
}
189189
}

scripts/fix-i18n.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ BEGIN
4848
A new password must be entered.
4949
Resetting password will currently reset any end-to-end encryption keys on all devices, making encrypted chat history unreadable, unless you first export your room keys and re-import them afterwards. In future this will be improved.
5050
Guests cannot join this room even if explicitly invited.
51+
Guest users can't invite users. Please register to invite.
52+
This room is inaccessible to guests. You may be able to join if you register.
53+
delete the alias.
54+
remove %(name)s from the directory.
5155
EOT
5256
)];
5357
}

src/components/structures/login/Login.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,20 @@ module.exports = React.createClass({
222222
(this.state.enteredHomeserverUrl.startsWith("http:") ||
223223
!this.state.enteredHomeserverUrl.startsWith("http")))
224224
{
225-
const urlStart = <a href='https://www.google.com/search?&q=enable%20unsafe%20scripts'>;
226-
const urlEnd = </a>;
227225
errorText = <span>
228-
{ _t('Can\'t connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or %(urlStart)s enable unsafe scripts %(urlEnd)s', {urlStart: urlStart, urlEnd: urlEnd})}
226+
{ _tJsx("Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. " +
227+
"Either use HTTPS or <a>enable unsafe scripts</a>.",
228+
/<a>(.*?)<\/a>/,
229+
(sub) => { return <a href="https://www.google.com/search?&q=enable%20unsafe%20scripts">{ sub }</a>; }
230+
)}
229231
</span>;
230232
}
231233
else {
232-
const urlStart = <a href={this.state.enteredHomeserverUrl}>;
233-
const urlEnd = </a>;
234234
errorText = <span>
235-
{ _t('Can\'t connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver\'s SSL certificate %(urlEnd)s is trusted', {urlStart: urlStart, urlEnd: urlEnd})}
235+
{ _tJsx("Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.",
236+
/<a>(.*?)<\/a>/,
237+
(sub) => { return <a href={this.state.enteredHomeserverUrl}>{ sub }</a>; }
238+
)}
236239
</span>;
237240
}
238241
}

src/i18n/strings/da.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"Searches DuckDuckGo for results": "Søger DuckDuckGo for resultater",
4141
"Commands": "kommandoer",
4242
"Emoji": "Emoji",
43-
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar.": "Kan ikke oprette forbindelse til hjemmeserver via HTTP, når en HTTPS-URL er i din browserbjælke.",
4443
"Sorry, this homeserver is using a login which is not recognised ": "Beklager, denne homeerver bruger et login, der ikke kan genkendes ",
4544
"Login as guest": "Log ind som gæst",
4645
"Return to app": "Tilbage til app",

src/i18n/strings/de_DE.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@
228228
"To kick users": "Um Nutzer zu entfernen",
229229
"Admin": "Administrator",
230230
"Server may be unavailable, overloaded, or you hit a bug": "Server könnte nicht verfügbar oder überlastet sein oder du bist auf einen Fehler gestoßen",
231-
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar": "Verbindung zum Homeserver ist über HTTP nicht möglich, wenn HTTPS in deiner Browserleiste steht",
232231
"Could not connect to the integration server": "Konnte keine Verbindung zum Integrations-Server herstellen",
233232
"Disable inline URL previews by default": "URL-Vorschau im Chat standardmäßig deaktivieren",
234233
"Guests can't use labs features. Please register.": "Gäste können keine Labor-Funktionen nutzen. Bitte registrieren.",
@@ -271,7 +270,6 @@
271270
"Who would you like to add to this room?": "Wen möchtest du zu diesem Raum hinzufügen?",
272271
"Who would you like to communicate with?": "Mit wem möchtest du kommunizieren?",
273272
"Would you like to": "Möchtest du",
274-
"You are trying to access": "Du möchtest Zugang zu %(sth)s bekommen",
275273
"You do not have permission to post to this room": "Du hast keine Berechtigung an diesen Raum etwas zu senden",
276274
"You have been invited to join this room by %(inviterName)s": "Du wurdest in diesen Raum eingeladen von %(inviterName)s",
277275
"You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "Du wurdest von allen Geräten ausgeloggt und wirst keine Push-Benachrichtigungen mehr bekommen. Um Benachrichtigungen zu reaktivieren melde dich auf jedem Gerät neu an",
@@ -560,8 +558,8 @@
560558
"Are you sure?": "Bist du sicher?",
561559
"Attachment": "Anhang",
562560
"Ban": "Verbannen",
563-
"Can't connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver's SSL certificate %(urlEnd)s is trusted": "Kann nicht zum Heimserver verbinden - bitte checke eine Verbindung und stelle sicher, dass dem %(urlStart)s SSL-Zertifikat deines Heimservers %(urlEnd)s vertraut wird",
564-
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or %(urlStart)s enable unsafe scripts %(urlEnd)s": "Kann nicht zum Heimserver via HTTP verbinden, wenn eine HTTPS-Url in deiner Adresszeile steht. Nutzer HTTPS oder %(urlStart)s aktiviere unsichere Skripte %(urlEnd)s",
561+
"Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.": "Kann nicht zum Heimserver verbinden - bitte checke eine Verbindung und stelle sicher, dass dem <a>SSL-Zertifikat deines Heimservers</a> vertraut wird.",
562+
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Kann nicht zum Heimserver via HTTP verbinden, wenn eine HTTPS-Url in deiner Adresszeile steht. Nutzer HTTPS oder <a>aktiviere unsichere Skripte</a>.",
565563
"changing room on a RoomView is not supported": "Das Ändern eines Raumes in einer RaumAnsicht wird nicht unterstützt",
566564
"Click to mute audio": "Klicke um den Ton stumm zu stellen",
567565
"Click to mute video": "Klicken, um das Video stummzuschalten",

src/i18n/strings/en_EN.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@
166166
"Bug Report": "Bug Report",
167167
"Bulk Options": "Bulk Options",
168168
"Call Timeout": "Call Timeout",
169-
"Can't connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver's SSL certificate %(urlEnd)s is trusted": "Can't connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver's SSL certificate %(urlEnd)s is trusted",
170-
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or %(urlStart)s enable unsafe scripts %(urlEnd)s": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or %(urlStart)s enable unsafe scripts %(urlEnd)s",
169+
"Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.": "Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.",
170+
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.",
171171
"Can't load user settings": "Can't load user settings",
172172
"Change Password": "Change Password",
173173
"%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.",
@@ -220,6 +220,7 @@
220220
"Devices will not yet be able to decrypt history from before they joined the room": "Devices will not yet be able to decrypt history from before they joined the room",
221221
"Direct Chat": "Direct Chat",
222222
"Direct chats": "Direct chats",
223+
"disabled": "disabled",
223224
"Disable inline URL previews by default": "Disable inline URL previews by default",
224225
"Disinvite": "Disinvite",
225226
"Display name": "Display name",
@@ -234,6 +235,7 @@
234235
"Email, name or matrix ID": "Email, name or matrix ID",
235236
"Emoji": "Emoji",
236237
"Enable encryption": "Enable encryption",
238+
"enabled": "enabled",
237239
"Encrypted messages will not be visible on clients that do not yet implement encryption": "Encrypted messages will not be visible on clients that do not yet implement encryption",
238240
"Encrypted room": "Encrypted room",
239241
"%(senderName)s ended the call.": "%(senderName)s ended the call.",
@@ -584,6 +586,7 @@
584586
"%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s": "%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s",
585587
"%(weekDayName)s %(time)s": "%(weekDayName)s %(time)s",
586588
"Set a display name:": "Set a display name:",
589+
"Set a Display Name": "Set a Display Name",
587590
"Upload an avatar:": "Upload an avatar:",
588591
"This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.",
589592
"Missing password.": "Missing password.",
@@ -682,19 +685,19 @@
682685
"Opt out of analytics": "Opt out of analytics",
683686
"Options": "Options",
684687
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
685-
"Please select the destination room for this message": "Please select the destination room for this message",
686688
"Passphrases must match": "Passphrases must match",
687689
"Passphrase must not be empty": "Passphrase must not be empty",
688690
"Export room keys": "Export room keys",
689691
"Enter passphrase": "Enter passphrase",
690692
"Confirm passphrase": "Confirm passphrase",
691693
"Import room keys": "Import room keys",
692694
"File to import": "File to import",
693-
"Enter passphrase": "Enter passphrase",
694695
"This process allows you to export the keys for messages you have received in encrypted rooms to a local file. You will then be able to import the file into another Matrix client in the future, so that client will also be able to decrypt these messages.": "This process allows you to export the keys for messages you have received in encrypted rooms to a local file. You will then be able to import the file into another Matrix client in the future, so that client will also be able to decrypt these messages.",
695696
"The exported file will allow anyone who can read it to decrypt any encrypted messages that you can see, so you should be careful to keep it secure. To help with this, you should enter a passphrase below, which will be used to encrypt the exported data. It will only be possible to import the data by using the same passphrase.": "The exported file will allow anyone who can read it to decrypt any encrypted messages that you can see, so you should be careful to keep it secure. To help with this, you should enter a passphrase below, which will be used to encrypt the exported data. It will only be possible to import the data by using the same passphrase.",
696697
"This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.": "This process allows you to import encryption keys that you had previously exported from another Matrix client. You will then be able to decrypt any messages that the other client could decrypt.",
697-
"The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.", "You must join the room to see its files": "You must join the room to see its files", "Server may be unavailable, overloaded, or you hit a bug.": "Server may be unavailable, overloaded, or you hit a bug.",
698+
"The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.",
699+
"You must join the room to see its files": "You must join the room to see its files",
700+
"Server may be unavailable, overloaded, or you hit a bug.": "Server may be unavailable, overloaded, or you hit a bug.",
698701
"Reject all %(invitedRooms)s invites": "Reject all %(invitedRooms)s invites",
699702
"Start new Chat": "Start new Chat",
700703
"Guest users can't invite users. Please register.": "Guest users can't invite users. Please register.",

src/i18n/strings/es.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@
166166
"Bug Report": "Reporte de error",
167167
"Bulk Options": "Opciones masivas",
168168
"Call Timeout": "Tiempo de espera de la llamada",
169-
"Can't connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver's SSL certificate %(urlEnd)s is trusted": "No se puede conectar con el servidor - Por favor verifique su conexión y asegúrese de que su %(urlStart)s certificado SSL del servidor %(urlEnd)s sea confiable",
170-
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or %(urlStart)s enable unsafe scripts %(urlEnd)s": "No se puede conectar al servidor via HTTP, cuando es necesario un enlace HTTPS en la barra de direcciones de tu navegador. Ya sea usando HTTPS o %(urlStart)s habilitando los scripts inseguros %(urlEnd)s",
169+
"Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.": "No se puede conectar con el servidor - Por favor verifique su conexión y asegúrese de que su <a>certificado SSL del servidor</a> sea confiable.",
170+
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "No se puede conectar al servidor via HTTP, cuando es necesario un enlace HTTPS en la barra de direcciones de tu navegador. Ya sea usando HTTPS o <a>habilitando los scripts inseguros</a>.",
171171
"Can't load user settings": "No se puede cargar las configuraciones del usuario",
172172
"Change Password": "Cambiar clave",
173173
"%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s ha cambiado su nombre de %(oldDisplayName)s a %(displayName)s.",

src/i18n/strings/fr.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@
209209
"Blacklisted": "Sur liste noire",
210210
"Bug Report": "Rapport d'erreur",
211211
"Call Timeout": "Délai d’appel expiré",
212-
"Can't connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver's SSL certificate %(urlEnd)s is trusted": "Connexion au Home Server impossible - merci de vérifier votre connectivité et que le %(urlStart)s certificat SSL de votre Home Server %(urlEnd)s est de confiance",
213-
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or %(urlStart)s enable unsafe scripts %(urlEnd)s": "Impossible de se connecter au homeserver en HTTP si l'URL dans la barre de votre explorateur est en HTTPS. Utilisez HTTPS ou %(urlStart)s activez le support des scripts non-vérifiés %(urlEnd)s",
212+
"Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.": "Connexion au Home Server impossible - merci de vérifier votre connectivité et que le <a>certificat SSL de votre Home Server</a> est de confiance.",
213+
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Impossible de se connecter au homeserver en HTTP si l'URL dans la barre de votre explorateur est en HTTPS. Utilisez HTTPS ou <a>activez le support des scripts non-vérifiés</a>.",
214214
"Can't load user settings": "Impossible de charger les paramètres utilisateur",
215215
"Change Password": "Changer le mot de passe",
216216
"%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s a changé son nom d’affichage de %(oldDisplayName)s en %(displayName)s.",

src/i18n/strings/nl.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@
167167
"Bug Report": "Bug report",
168168
"Bulk Options": "Bulk opties",
169169
"Call Timeout": "Gesprek time-out",
170-
"Can't connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver's SSL certificate %(urlEnd)s is trusted": "Kan niet met de homeserver verbinden - controleer alsjeblieft je verbinding en wees zeker dat je %(urlStart)s homeserver's SSL certificaat %(urlEnd)s vertrouwd wordt",
171-
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or %(urlStart)s enable unsafe scripts %(urlEnd)s": "Kan niet met de homeserver verbinden via HTTP wanneer er een HTTPS URL in je browser balk staat. Gebruik HTTPS of %(urlStart)s activeer onveilige scripts %(urlEnd)s",
170+
"Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.": "Kan niet met de homeserver verbinden - controleer alsjeblieft je verbinding en wees zeker dat je <a>homeserver's SSL certificaat</a> vertrouwd wordt.",
171+
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Kan niet met de homeserver verbinden via HTTP wanneer er een HTTPS URL in je browser balk staat. Gebruik HTTPS of <a>activeer onveilige scripts</a>.",
172172
"Can't load user settings": "Kan de gebruiker instellingen niet laden",
173173
"Change Password": "Wachtwoord veranderen",
174174
"%(senderName)s changed their display name from %(oldDisplayName)s to %(displayName)s.": "%(senderName)s heeft zijn of haar weergave naam veranderd van %(oldDisplayName)s naar %(displayName)s.",

src/i18n/strings/pt_BR.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,8 @@
567567
"sx": "Sutu",
568568
"sz": "Sami (Lappish)",
569569
"ve": "Venda",
570-
"Can't connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver's SSL certificate %(urlEnd)s is trusted": "Não consigo conectar ao servidor padrão - favor checar sua conexão à internet e verificar se o certificado SSL do seu %(urlStart)s servidor padrão %(urlEnd)s é confiável",
571-
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or %(urlStart)s enable unsafe scripts %(urlEnd)s": "Não consigo conectar ao servidor padrão através de HTTP quando uma URL HTTPS está na barra de endereços do seu navegador. Use HTTPS ou então %(urlStart)s habilite scripts não seguros no seu navegador %(urlEnd)s",
570+
"Can't connect to homeserver - please check your connectivity and ensure your <a>homeserver's SSL certificate</a> is trusted.": "Não consigo conectar ao servidor padrão - favor checar sua conexão à internet e verificar se o certificado SSL do seu <a>servidor padrão</a> é confiável.",
571+
"Can't connect to homeserver via HTTP when an HTTPS URL is in your browser bar. Either use HTTPS or <a>enable unsafe scripts</a>.": "Não consigo conectar ao servidor padrão através de HTTP quando uma URL HTTPS está na barra de endereços do seu navegador. Use HTTPS ou então <a>habilite scripts não seguros no seu navegador</a>.",
572572
"Change Password": "Alterar senha",
573573
"changing room on a RoomView is not supported": "mudar a sala em uma 'RoomView' não é permitido",
574574
"Click to mute audio": "Clique para colocar o áudio no mudo",

0 commit comments

Comments
 (0)