mirror of https://github.com/vector-im/riot-web
				
				
				
			Merge pull request #1462 from pafcu/translation-fixes
Use standard subsitution syntax in _tJsxpull/21833/head
						commit
						f32ba0b54c
					
				|  | @ -70,9 +70,9 @@ module.exports = React.createClass({ | |||
|         // it sucks that _tJsx doesn't support normal _t substitutions :((
 | ||||
|         return ( | ||||
|             <div className="mx_RoomAvatarEvent"> | ||||
|                 { _tJsx('$senderDisplayName changed the room avatar to <img/>', | ||||
|                 { _tJsx('%(senderDisplayName)s changed the room avatar to <img/>', | ||||
|                          [ | ||||
|                             /\$senderDisplayName/, | ||||
|                             /%\(senderDisplayName\)s/, | ||||
|                             /<img\/>/, | ||||
|                          ], | ||||
|                          [ | ||||
|  |  | |||
|  | @ -728,7 +728,7 @@ | |||
|     "WARNING: KEY VERIFICATION FAILED! The signing key for %(userId)s and device %(deviceId)s is \"%(fprint)s\" which does not match the provided key \"%(fingerprint)s\". This could mean your communications are being intercepted!": "WARNUNG: SCHLÜSSEL-VERIFIZIERUNG FEHLGESCHLAGEN! Der Signatur-Schlüssel für %(userId)s und das Gerät %(deviceId)s ist \"%(fprint)s\", welcher nicht mit dem bereitgestellten Schlüssel \"%(fingerprint)s\" übereinstimmt. Dies kann bedeuten, dass deine Kommunikation abgehört wird!", | ||||
|     "You have <a>disabled</a> URL previews by default.": "Du hast die URL-Vorschau standardmäßig <a>deaktiviert</a>.", | ||||
|     "You have <a>enabled</a> URL previews by default.": "Du hast die URL-Vorschau standardmäßig <a>aktiviert</a>.", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName hat das Raum-Bild geändert zu <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s hat das Raum-Bild geändert zu <img/>", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s hat das Raum-Bild für %(roomName)s geändert", | ||||
|     "Hide removed messages": "Gelöschte Nachrichten verbergen", | ||||
|     "Start new chat": "Neuen Chat starten", | ||||
|  |  | |||
|  | @ -639,7 +639,7 @@ | |||
|     "Disable URL previews by default for participants in this room": "Απενεργοποίηση της προεπισκόπησης συνδέσμων για όλους τους συμμετέχοντες στο δωμάτιο", | ||||
|     "Disable URL previews for this room (affects only you)": "Απενεργοποίηση της προεπισκόπησης συνδέσμων για αυτό το δωμάτιο (επηρεάζει μόνο εσάς)", | ||||
|     " (unsupported)": " (μη υποστηριζόμενο)", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "Ο $senderDisplayName άλλαξε την εικόνα του δωματίου σε <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "Ο %(senderDisplayName)s άλλαξε την εικόνα του δωματίου σε <img/>", | ||||
|     "Missing Media Permissions, click here to request.": "Λείπουν τα δικαιώματα πολύμεσων, κάντε κλικ για να ζητήσετε.", | ||||
|     "You may need to manually permit Riot to access your microphone/webcam": "Μπορεί να χρειαστεί να ορίσετε χειροκίνητα την πρόσβαση του Riot στο μικρόφωνο/κάμερα", | ||||
|     "Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Δεν είναι δυνατή η σύνδεση στον διακομιστή - παρακαλούμε ελέγξτε την συνδεσιμότητα, βεβαιωθείτε ότι το <a>πιστοποιητικό SSL</a> του διακομιστή είναι έμπιστο και ότι κάποιο πρόσθετο περιηγητή δεν αποτρέπει τα αιτήματα.", | ||||
|  |  | |||
|  | @ -788,7 +788,7 @@ | |||
|     "Start chatting": "Start chatting", | ||||
|     "Start Chatting": "Start Chatting", | ||||
|     "Click on the button below to start chatting!": "Click on the button below to start chatting!", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName changed the room avatar to <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s changed the room avatar to <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s removed the room avatar.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s changed the avatar for %(roomName)s", | ||||
|     "Username available": "Username available", | ||||
|  |  | |||
|  | @ -705,7 +705,7 @@ | |||
|     "Idle": "Idle", | ||||
|     "Offline": "Offline", | ||||
|     "Disable URL previews for this room (affects only you)": "Disable URL previews for this room (affects only you)", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName changed the room avatar to <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s changed the room avatar to <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s removed the room avatar.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s changed the avatar for %(roomName)s", | ||||
|     "Active call (%(roomName)s)": "Active call (%(roomName)s)", | ||||
|  |  | |||
|  | @ -736,7 +736,7 @@ | |||
|     "Start chatting": "Hasi txateatzen", | ||||
|     "Start Chatting": "Hasi txateatzen", | ||||
|     "Click on the button below to start chatting!": "Egin klik beheko botoian txateatzen hasteko!", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName erabiltzaileak gelaren abatarra aldatu du beste honetara: <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s erabiltzaileak gelaren abatarra aldatu du beste honetara: <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s erabiltzaileak gelaren abatarra ezabatu du.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s erabiltzaileak %(roomName)s gelaren abatarra aldatu du", | ||||
|     "Username available": "Erabiltzaile-izena eskuragarri dago", | ||||
|  |  | |||
|  | @ -637,7 +637,7 @@ | |||
|     "for %(amount)sm": "depuis %(amount)sm", | ||||
|     "for %(amount)sh": "depuis %(amount)sh", | ||||
|     "for %(amount)sd": "depuis %(amount)sj", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName a changé l’avatar du salon en <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s a changé l’avatar du salon en <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s a supprimé l'avatar du salon.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s a changé l’avatar de %(roomName)s", | ||||
|     "Device already verified!": "Appareil déjà vérifié !", | ||||
|  |  | |||
|  | @ -723,7 +723,7 @@ | |||
|     "Start chatting": "Csevegés indítása", | ||||
|     "Start Chatting": "Csevegés indítása", | ||||
|     "Click on the button below to start chatting!": "Csevegés indításához kattints a gombra alább!", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName megváltoztatta a szoba avatar képét: <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s megváltoztatta a szoba avatar képét: <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s törölte a szoba avatar képét.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s megváltoztatta %(roomName)s szoba avatar képét", | ||||
|     "Username available": "Szabad felhasználói név", | ||||
|  |  | |||
|  | @ -743,7 +743,7 @@ | |||
|     "Start chatting": "이야기하기", | ||||
|     "Start Chatting": "이야기하기", | ||||
|     "Click on the button below to start chatting!": "이야기하려면 아래 버튼을 누르세요!", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName님이 방 아바타를 <img/>로 바꾸셨어요", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s님이 방 아바타를 <img/>로 바꾸셨어요", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s님이 방 아바타를 지우셨어요.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s가 %(roomName)s 방의 아바타를 바꾸셨어요", | ||||
|     "Username available": "쓸 수 있는 사용자 이름", | ||||
|  |  | |||
|  | @ -619,7 +619,7 @@ | |||
|     "Dec": "Dec.", | ||||
|     "Set a display name:": "Iestatīt redzamo vārdu:", | ||||
|     "This image cannot be displayed.": "Šo attēlu nav iespējams parādīt.", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName nomainīja istabas attēlu uz <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s nomainīja istabas attēlu uz <img/>", | ||||
|     "Upload an avatar:": "Augšuplādē profila attēlu:", | ||||
|     "This server does not support authentication with a phone number.": "Šis serveris neatbalsta autentifikāciju pēc telefona numura.", | ||||
|     "Missing password.": "Trūkst parole.", | ||||
|  |  | |||
|  | @ -746,7 +746,7 @@ | |||
|     "Start chatting": "Start met praten", | ||||
|     "Start Chatting": "Start Met Praten", | ||||
|     "Click on the button below to start chatting!": "Klik op de knop hieronder om te starten met praten!", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName heeft de ruimte avatar aangepast naar <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s heeft de ruimte avatar aangepast naar <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s heeft de ruimte avatar verwijderd.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s veranderde de avatar voor %(roomName)s", | ||||
|     "Username available": "Gebruikersnaam beschikbaar", | ||||
|  |  | |||
|  | @ -771,7 +771,7 @@ | |||
|     "for %(amount)sd": "%(amount)s dni", | ||||
|     "Idle": "Bezczynny", | ||||
|     "Check for update": "Sprawdź aktualizacje", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName zmienił awatar pokoju na <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s zmienił awatar pokoju na <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s usunął awatar pokoju.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s zmienił awatar %(roomName)s", | ||||
|     "This will be your account name on the <span></span> homeserver, or you can pick a <a>different server</a>.": "To będzie twoja nazwa konta na <span></span> serwerze domowym; możesz też wybrać <a>inny serwer</a>.", | ||||
|  |  | |||
|  | @ -699,7 +699,7 @@ | |||
|     "for %(amount)sd": "por %(amount)sd", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s removeu a imagem da sala.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s alterou a imagem da sala %(roomName)s", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName alterou a imagem da sala para <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s alterou a imagem da sala para <img/>", | ||||
|     "Missing Media Permissions, click here to request.": "Faltam permissões para uso de mídia no seu computador. Clique aqui para solicitá-las.", | ||||
|     "No Microphones detected": "Não foi detetado nenhum microfone", | ||||
|     "No Webcams detected": "Não foi detetada nenhuma Webcam", | ||||
|  |  | |||
|  | @ -696,7 +696,7 @@ | |||
|     "for %(amount)sd": "por %(amount)sd", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s removeu a imagem da sala.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s alterou a imagem da sala %(roomName)s", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName alterou a imagem da sala para <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s alterou a imagem da sala para <img/>", | ||||
|     "Missing Media Permissions, click here to request.": "Faltam permissões para uso de mídia no seu computador. Clique aqui para solicitá-las.", | ||||
|     "No Microphones detected": "Não foi detectado nenhum microfone", | ||||
|     "No Webcams detected": "Não foi detectada nenhuma Webcam", | ||||
|  |  | |||
|  | @ -705,7 +705,7 @@ | |||
|     "Idle": "Неактивен", | ||||
|     "Offline": "Не в сети", | ||||
|     "Disable URL previews for this room (affects only you)": "Отключить предпросмотр URL-адресов для этой комнаты (влияет только на вас)", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName сменил аватар комнаты на <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s сменил аватар комнаты на <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s удалил аватар комнаты.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s сменил аватар для %(roomName)s", | ||||
|     "Create new room": "Создать новую комнату", | ||||
|  |  | |||
|  | @ -738,7 +738,7 @@ | |||
|     "Start chatting": "Sohbeti başlat", | ||||
|     "Start Chatting": "Sohbeti Başlat", | ||||
|     "Click on the button below to start chatting!": "Sohbeti başlatmak için aşağıdaki butona tıklayın!", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName odanın avatarını <img/> olarak çevirdi", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s odanın avatarını <img/> olarak çevirdi", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s odanın avatarını kaldırdı.", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s  %(roomName)s için avatarı değiştirdi", | ||||
|     "Username available": "Kullanıcı ismi uygun", | ||||
|  |  | |||
|  | @ -228,7 +228,7 @@ | |||
|     "Idle": "閒置", | ||||
|     "Offline": "下線", | ||||
|     "Disable URL previews for this room (affects only you)": "在這個房間禁止URL預覽(只影響你)", | ||||
|     "$senderDisplayName changed the room avatar to <img/>": "$senderDisplayName 更改了聊天室的圖像為 <img/>", | ||||
|     "%(senderDisplayName)s changed the room avatar to <img/>": "%(senderDisplayName)s 更改了聊天室的圖像為 <img/>", | ||||
|     "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s 移除了聊天室圖片。", | ||||
|     "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s 更改了聊天室 %(roomName)s 圖像", | ||||
|     "Cancel": "取消", | ||||
|  |  | |||
|  | @ -109,8 +109,9 @@ export function _tJsx(jsxText, patterns, subs) { | |||
|     } | ||||
| 
 | ||||
|     // The translation returns text so there's no XSS vector here (no unsafe HTML, no code execution)
 | ||||
|     const tJsxText = _t(jsxText); | ||||
|     const tJsxText = _t(jsxText, {interpolate: false}); | ||||
|     const output = [tJsxText]; | ||||
| 
 | ||||
|     for (let i = 0; i < patterns.length; i++) { | ||||
|         // convert the last element in 'output' into 3 elements (pre-text, sub function, post-text).
 | ||||
|         // Rinse and repeat for other patterns (using post-text).
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Matthew Hodgson
						Matthew Hodgson