From 138e2ca38325f0905095334f9f64308d00abae3d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 30 Jun 2020 14:47:19 +0100 Subject: [PATCH] Translate http codes --- daemon.py | 27 ++++++++++++++++----------- translations/ar.json | 11 ++++++++++- translations/ca.json | 11 ++++++++++- translations/cy.json | 11 ++++++++++- translations/de.json | 11 ++++++++++- translations/en.json | 11 ++++++++++- translations/es.json | 11 ++++++++++- translations/fr.json | 11 ++++++++++- translations/ga.json | 11 ++++++++++- translations/hi.json | 11 ++++++++++- translations/it.json | 11 ++++++++++- translations/ja.json | 11 ++++++++++- translations/oc.json | 11 ++++++++++- translations/pt.json | 11 ++++++++++- translations/ru.json | 11 ++++++++++- translations/zh.json | 11 ++++++++++- 16 files changed, 166 insertions(+), 26 deletions(-) diff --git a/daemon.py b/daemon.py index fd942822..6de4235e 100644 --- a/daemon.py +++ b/daemon.py @@ -615,25 +615,30 @@ class PubServer(BaseHTTPRequestHandler): print(e) def _200(self) -> None: - self._httpReturnCode(200, 'Ok', - 'This is nothing less than an utter triumph.') + self._httpReturnCode(200, self.server.translate['Ok'], + self.server.translate['This is nothing less ' + + 'than an utter triumph']) def _404(self) -> None: - self._httpReturnCode(404, 'Not Found', - 'These are not the droids you are looking for.') + self._httpReturnCode(404, self.server.translate['Not Found'], + self.server.translate['These are not the ' + + 'droids you are ' + + 'looking for']) def _304(self) -> None: - self._httpReturnCode(304, 'Not changed', - 'The contents of your local cache are ' + - 'up to date.') + self._httpReturnCode(304, self.server.translate['Not changed'], + self.server.translate['The contents of your ' + + 'local cache are up ' + + 'to date']) def _400(self) -> None: - self._httpReturnCode(400, 'Bad Request', - 'Better luck next time.') + self._httpReturnCode(400, self.server.translate['Bad Request'], + self.server.translate['Better luck next time']) def _503(self) -> None: - self._httpReturnCode(503, 'Unavailable', - 'The server is busy. Please try again later.') + self._httpReturnCode(503, self.server.translate['Unavailable'], + self.server.translate['The server is busy. ' + + 'Please try again later']) def _write(self, msg) -> None: tries = 0 diff --git a/translations/ar.json b/translations/ar.json index 96fd7166..4a50c4e3 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -238,5 +238,14 @@ "Replying to": "الرد على", "Send to": "ارسل إلى", "Show a list of addresses to send to": "عرض قائمة بالعناوين التي تريد الإرسال إليها", - "Petname": "Petname" + "Petname": "Petname", + "Ok": "حسنا", + "This is nothing less than an utter triumph": "هذا ليس أقل من انتصار مطلق", + "These are not the droids you are looking for": "هذه ليست الروبوتات التي تبحث عنها", + "Not changed": "لم يتغير", + "The contents of your local cache are up to date": "محتويات ذاكرة التخزين المؤقت المحلية الخاصة بك محدثة", + "Bad Request": "اقتراح غير جيد", + "Better luck next time": "حظ أوفر في المرة القادمة", + "Unavailable": "غير متوفره", + "The server is busy. Please try again later": "الخادم مشغول. الرجاء معاودة المحاولة في وقت لاحق" } diff --git a/translations/ca.json b/translations/ca.json index f1e15162..24fc23f2 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -238,5 +238,14 @@ "Replying to": "Responent a", "Send to": "Envia a", "Show a list of addresses to send to": "Mostra una llista d’adreces a les quals enviar-la", - "Petname": "Nom de mascota" + "Petname": "Nom de mascota", + "Ok": "D'acord", + "This is nothing less than an utter triumph": "Això no és menys que un absolut triomf", + "These are not the droids you are looking for": "Aquests no són els droides que busca", + "Not changed": "No s'ha canviat", + "The contents of your local cache are up to date": "El contingut de la memòria cau local està actualitzat", + "Bad Request": "Sol·licitud incorrecta", + "Better luck next time": "Que tingueu més sort la propera vegada", + "Unavailable": "No disponible", + "The server is busy. Please try again later": "El servidor està ocupat. Siusplau, intenta-ho més tard" } diff --git a/translations/cy.json b/translations/cy.json index 047d14c4..1ef49080 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -238,5 +238,14 @@ "Replying to": "Ymateb i", "Send to": "Anfon i", "Show a list of addresses to send to": "Dangoswch restr o gyfeiriadau i anfon atynt", - "Petname": "Enw anwes" + "Petname": "Enw anwes", + "Ok": "Iawn", + "This is nothing less than an utter triumph": "Nid yw hyn yn ddim llai na buddugoliaeth lwyr", + "These are not the droids you are looking for": "Nid dyma'r droids rydych chi'n edrych amdanyn nhw", + "Not changed": "Heb ei newid", + "The contents of your local cache are up to date": "Mae cynnwys eich storfa leol yn gyfredol", + "Bad Request": "Cais drwg", + "Better luck next time": "Gwell lwc y tro nesaf", + "Unavailable": "Ddim ar gael", + "The server is busy. Please try again later": "Mae'r gweinydd yn brysur. Rho gynnig Arni eto'n hwyrach" } diff --git a/translations/de.json b/translations/de.json index d0e9b63d..05386cfe 100644 --- a/translations/de.json +++ b/translations/de.json @@ -238,5 +238,14 @@ "Replying to": "Antworten auf", "Send to": "Senden an", "Show a list of addresses to send to": "Zeigen Sie eine Liste der Adressen an, an die gesendet werden soll", - "Petname": "Haustiername" + "Petname": "Haustiername", + "Ok": "OK", + "This is nothing less than an utter triumph": "Dies ist nichts weniger als ein völliger Triumph", + "These are not the droids you are looking for": "Dies sind nicht die Droiden, die Sie suchen", + "Not changed": "Nicht geändert", + "The contents of your local cache are up to date": "Der Inhalt Ihres lokalen Caches ist aktuell", + "Bad Request": "Ungültige Anforderung", + "Better luck next time": "Viel Glück beim nächsten Mal", + "Unavailable": "Nicht verfügbar", + "The server is busy. Please try again later": "Der Server ist beschäftigt. Bitte versuchen Sie es später noch einmal" } diff --git a/translations/en.json b/translations/en.json index f7e7d3f5..bb392c0f 100644 --- a/translations/en.json +++ b/translations/en.json @@ -238,5 +238,14 @@ "Replying to": "Replying to", "Send to": "Send to", "Show a list of addresses to send to": "Show a list of addresses to send to", - "Petname": "Petname" + "Petname": "Petname", + "Ok": "Ok", + "This is nothing less than an utter triumph": "This is nothing less than an utter triumph", + "These are not the droids you are looking for": "These are not the droids you are looking for", + "Not changed": "Not changed", + "The contents of your local cache are up to date": "The contents of your local cache are up to date", + "Bad Request": "Bad Request", + "Better luck next time": "Better luck next time", + "Unavailable": "Unavailable", + "The server is busy. Please try again later": "The server is busy. Please try again later" } diff --git a/translations/es.json b/translations/es.json index 5a458d34..6b5d8130 100644 --- a/translations/es.json +++ b/translations/es.json @@ -238,5 +238,14 @@ "Replying to": "Respondiendo a", "Send to": "Enviar a", "Show a list of addresses to send to": "Mostrar una lista de direcciones para enviar", - "Petname": "Nombre de mascota" + "Petname": "Nombre de mascota", + "Ok": "Okay", + "This is nothing less than an utter triumph": "Esto es nada menos que un triunfo absoluto", + "These are not the droids you are looking for": "Estos no son los droides que estás buscando", + "Not changed": "Sin cambio", + "The contents of your local cache are up to date": "El contenido de su caché local está actualizado", + "Bad Request": "Solicitud incorrecta", + "Better luck next time": "Mejor suerte la próxima vez", + "Unavailable": "Indisponible", + "The server is busy. Please try again later": "El servidor esta ocupado. Por favor, inténtelo de nuevo más tarde" } diff --git a/translations/fr.json b/translations/fr.json index eb9b8c96..cdb5dd4b 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -238,5 +238,14 @@ "Replying to": "Répondre à", "Send to": "Envoyer à", "Show a list of addresses to send to": "Afficher une liste d'adresses à envoyer", - "Petname": "Nom d'animal domestique" + "Petname": "Nom d'animal domestique", + "Ok": "D'accord", + "This is nothing less than an utter triumph": "Ce n'est rien de moins qu'un triomphe absolu", + "These are not the droids you are looking for": "Ce ne sont pas les droïdes que vous recherchez", + "Not changed": "Inchangé", + "The contents of your local cache are up to date": "Le contenu de votre cache local est à jour", + "Bad Request": "Mauvaise Demande", + "Better luck next time": "Plus de chance la prochaine fois", + "Unavailable": "Indisponible", + "The server is busy. Please try again later": "Le serveur est occupé. Veuillez réessayer plus tard" } diff --git a/translations/ga.json b/translations/ga.json index 19b329c4..437c398b 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -238,5 +238,14 @@ "Replying to": "Ag freagairt do", "Send to": "Sheoladh chuig", "Show a list of addresses to send to": "Taispeáin liosta seoltaí le seoladh chucu", - "Petname": "Ainmainm" + "Petname": "Ainmainm", + "Ok": "Ceart go leor", + "This is nothing less than an utter triumph": "Ní lú ná bua iomlán é seo", + "These are not the droids you are looking for": "Ní hiad seo na droids atá á lorg agat", + "Not changed": "Gan athrú", + "The contents of your local cache are up to date": "Tá ábhar do thaisce áitiúil cothrom le dáta", + "Bad Request": "Droch-Iarraidh", + "Better luck next time": "Ádh níos fearr an chéad uair eile", + "Unavailable": "Níl sé ar fáil", + "The server is busy. Please try again later": "Tá an freastalaí gnóthach. Bain triail eile as níos déanaí" } diff --git a/translations/hi.json b/translations/hi.json index e4fa4375..ff3fd05b 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -238,5 +238,14 @@ "Replying to": "को जवाब दे रहा है", "Send to": "भेजना", "Show a list of addresses to send to": "भेजने के लिए पते की एक सूची दिखाएं", - "Petname": "अल्पार्थक नाम" + "Petname": "अल्पार्थक नाम", + "Ok": "ठीक", + "This is nothing less than an utter triumph": "यह एक पूरी तरह से जीत से कम नहीं है", + "These are not the droids you are looking for": "ये वे डायरियां नहीं हैं जिनकी आप तलाश कर रहे हैं", + "Not changed": "परिवर्तन नहीं हुआ है", + "The contents of your local cache are up to date": "आपके स्थानीय कैश की सामग्री अप टू डेट है", + "Bad Request": "खराब अनुरोध", + "Better luck next time": "अगली बार किस्मत तुम्हारा साथ देगी", + "Unavailable": "अनुपलब्ध", + "The server is busy. Please try again later": "सर्वर व्यस्त है। बाद में पुन: प्रयास करें" } diff --git a/translations/it.json b/translations/it.json index 55e3f94b..031b2910 100644 --- a/translations/it.json +++ b/translations/it.json @@ -238,5 +238,14 @@ "Replying to": "In risposta a", "Send to": "Inviare a", "Show a list of addresses to send to": "Mostra un elenco di indirizzi a cui inviare", - "Petname": "Nome del cucciolo" + "Petname": "Nome del cucciolo", + "Ok": "Ok", + "This is nothing less than an utter triumph": "Questo non è altro che un trionfo assoluto", + "These are not the droids you are looking for": "Questi non sono i droidi che stai cercando", + "Not changed": "Non cambiato", + "The contents of your local cache are up to date": "I contenuti della cache locale sono aggiornati", + "Bad Request": "Brutta richiesta", + "Better luck next time": "La prossima volta sarai più fortunato", + "Unavailable": "non disponibile", + "The server is busy. Please try again later": "Il server è occupato. Per favore riprova più tardi" } diff --git a/translations/ja.json b/translations/ja.json index d1b3ec73..7cf405f2 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -238,5 +238,14 @@ "Replying to": "に返信しています", "Send to": "に送る", "Show a list of addresses to send to": "送信するアドレスのリストを表示する", - "Petname": "ペットネーム" + "Petname": "ペットネーム", + "Ok": "OK", + "This is nothing less than an utter triumph": "これは完全な勝利に他ならない", + "These are not the droids you are looking for": "これらはあなたが探しているドロイドではありません", + "Not changed": "変わらない", + "The contents of your local cache are up to date": "ローカルキャッシュの内容は最新です", + "Bad Request": "要求の形式が正しくありません", + "Better luck next time": "次回は幸運を", + "Unavailable": "利用できません", + "The server is busy. Please try again later": "サーバーはビジーです。 後でもう一度やり直してください" } diff --git a/translations/oc.json b/translations/oc.json index 5888fe2f..c78c8dad 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -234,5 +234,14 @@ "Replying to": "Replying to", "Send to": "Send to", "Show a list of addresses to send to": "Show a list of addresses to send to", - "Petname": "Petname" + "Petname": "Petname", + "Ok": "Ok", + "This is nothing less than an utter triumph": "This is nothing less than an utter triumph", + "These are not the droids you are looking for": "These are not the droids you are looking for", + "Not changed": "Not changed", + "The contents of your local cache are up to date": "The contents of your local cache are up to date", + "Bad Request": "Bad Request", + "Better luck next time": "Better luck next time", + "Unavailable": "Unavailable", + "The server is busy. Please try again later": "The server is busy. Please try again later" } diff --git a/translations/pt.json b/translations/pt.json index 1d744bcf..17e5df52 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -238,5 +238,14 @@ "Replying to": "Respondendo a", "Send to": "Enviar para", "Show a list of addresses to send to": "Mostrar uma lista de endereços para enviar para", - "Petname": "Nome do animal de estimação" + "Petname": "Nome do animal de estimação", + "Ok": "Está bem", + "This is nothing less than an utter triumph": "Isso é nada menos que um triunfo absoluto", + "These are not the droids you are looking for": "Estes não são os dróides que você está procurando", + "Not changed": "Não mudou", + "The contents of your local cache are up to date": "O conteúdo do seu cache local está atualizado", + "Bad Request": "Pedido ruim", + "Better luck next time": "Mais sorte da próxima vez", + "Unavailable": "Indisponível", + "The server is busy. Please try again later": "O servidor está ocupado. Por favor, tente novamente mais tarde" } diff --git a/translations/ru.json b/translations/ru.json index 76def9c2..bd1a8f23 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -238,5 +238,14 @@ "Replying to": "Отвечать на", "Send to": "Отправить", "Show a list of addresses to send to": "Показать список адресов для отправки", - "Petname": "Имя питомца" + "Petname": "Имя питомца", + "Ok": "Хорошо", + "This is nothing less than an utter triumph": "Это не что иное, как полный триумф", + "These are not the droids you are looking for": "Это не те дроиды, которых вы ищете", + "Not changed": "Не изменился", + "The contents of your local cache are up to date": "Содержимое вашего локального кэша обновлено", + "Bad Request": "Неверный запрос", + "Better luck next time": "Повезет в следующий раз", + "Unavailable": "Недоступен", + "The server is busy. Please try again later": "Сервер занят. Пожалуйста, попробуйте позже" } diff --git a/translations/zh.json b/translations/zh.json index 92517106..7cb5c6a6 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -237,5 +237,14 @@ "Replying to": "回覆", "Send to": "发给", "Show a list of addresses to send to": "显示要发送到的地址列表", - "Petname": "宠物名" + "Petname": "宠物名", + "Ok": "好", + "This is nothing less than an utter triumph": "这无非是胜利", + "These are not the droids you are looking for": "这些不是您要寻找的机器人", + "Not changed": "没有改变", + "The contents of your local cache are up to date": "您本地缓存的内容是最新的", + "Bad Request": "错误的请求", + "Better luck next time": "下次好运", + "Unavailable": "不可用", + "The server is busy. Please try again later": "服务器忙。 请稍后再试" }