From a5d91298ff9ca08cb5ff3fd62aa304f378353d5d Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 1 Jan 2017 16:33:11 +0100 Subject: [PATCH] add an option to change the site name, solves #154 --- CHANGELOG.md | 1 + cfg/conf.ini.sample | 3 +++ i18n/de.json | 30 +++++++++++++++--------------- i18n/es.json | 30 +++++++++++++++--------------- i18n/fr.json | 30 +++++++++++++++--------------- i18n/it.json | 30 +++++++++++++++--------------- i18n/pl.json | 30 +++++++++++++++--------------- i18n/ru.json | 30 +++++++++++++++--------------- i18n/sl.json | 30 +++++++++++++++--------------- i18n/zh.json | 30 +++++++++++++++--------------- lib/Configuration.php | 3 ++- lib/PrivateBin.php | 5 +++-- tpl/bootstrap-compact.php | 12 ++++++------ tpl/bootstrap-dark-page.php | 12 ++++++------ tpl/bootstrap-dark.php | 12 ++++++------ tpl/bootstrap-page.php | 12 ++++++------ tpl/bootstrap.php | 12 ++++++------ tpl/page.php | 10 +++++----- tst/ViewTest.php | 3 ++- 19 files changed, 166 insertions(+), 159 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e27cea3..41f5cd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * **next (not yet released)** * ADDED: Translations for Spanish + * ADDED: Option in configuration to change the default "PrivateBin" title on the site. * **1.1 (2016-12-26)** * ADDED: Translations for Italian and Russian * ADDED: Loading message displayed until decryption succeeded for slower (in terms of CPU or network) systems diff --git a/cfg/conf.ini.sample b/cfg/conf.ini.sample index 16ce1d7..11d2016 100644 --- a/cfg/conf.ini.sample +++ b/cfg/conf.ini.sample @@ -3,6 +3,9 @@ ; An explanation of each setting can be find online at https://github.com/PrivateBin/PrivateBin/wiki/Configuration. [main] +; (optional) set a project name to be displayed on the website +; name = "PrivateBin" + ; enable or disable the discussion feature, defaults to true discussion = true diff --git a/i18n/de.json b/i18n/de.json index 330c2fb..87f55cc 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -1,11 +1,16 @@ { + "PrivateBin": "PrivateBin", + "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": + "%s ist ein minimalistischer, quelloffener \"Pastebin\"-artiger Dienst, bei dem der Server keinerlei Kenntnis der Inhalte hat. Die Daten werden im Browser mit 256 Bit AES ver- und entschlüsselt. Weitere Informationen sind auf der Projektseite zu finden.", + "Because ignorance is bliss": + "Unwissenheit ist ein Segen", "en": "de", "Paste does not exist, has expired or has been deleted.": "Diesen Text gibt es nicht, er ist abgelaufen oder wurde gelöscht.", - "PrivateBin requires php 5.3.0 or above to work. Sorry.": - "PrivateBin benötigt PHP 5.3.0 oder höher, um zu funktionieren. Sorry.", - "PrivateBin requires configuration section [%s] to be present in configuration file.": - "PrivateBin benötigt den Konfigurationsabschnitt [%s] in der Konfigurationsdatei um zu funktionieren.", + "%s requires php 5.3.0 or above to work. Sorry.": + "%s benötigt PHP 5.3.0 oder höher, um zu funktionieren. Sorry.", + "%s requires configuration section [%s] to be present in configuration file.": + "%s benötigt den Konfigurationsabschnitt [%s] in der Konfigurationsdatei um zu funktionieren.", "Please wait %d seconds between each post.": "Bitte warte %d Sekunden zwischen dem Absenden.", "Paste is limited to %s of encrypted data.": @@ -26,15 +31,10 @@ "Falscher Lösch-Code. Text wurde nicht gelöscht.", "Paste was properly deleted.": "Text wurde erfolgreich gelöscht.", - "PrivateBin": "PrivateBin", - "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": - "PrivateBin ist ein minimalistischer, quelloffener \"Pastebin\"-artiger Dienst, bei dem der Server keinerlei Kenntnis der Inhalte hat. Die Daten werden im Browser mit 256 Bit AES ver- und entschlüsselt. Weitere Informationen sind auf der Projektseite zu finden.", - "Because ignorance is bliss": - "Unwissenheit ist ein Segen", - "JavaScript is required for PrivateBin to work.
Sorry for the inconvenience.": - "JavaScript ist eine Voraussetzung, um PrivateBin zu nutzen.
Bitte entschuldige die Unannehmlichkeiten.", - "PrivateBin requires a modern browser to work.": - "PrivateBin setzt einen modernen Browser voraus, um funktionieren zu können.", + "JavaScript is required for %s to work.
Sorry for the inconvenience.": + "JavaScript ist eine Voraussetzung, um %s zu nutzen.
Bitte entschuldige die Unannehmlichkeiten.", + "%s requires a modern browser to work.": + "%s setzt einen modernen Browser voraus, um funktionieren zu können.", "Still using Internet Explorer? Do yourself a favor, switch to a modern browser:": "Du benutzt immer noch den Internet Explorer? Tu Dir einen Gefallen und wechsle zu einem moderneren Browser:", "New": @@ -139,8 +139,8 @@ "Shorten URL": "URL verkürzen", "Editor": "Bearbeiten", "Preview": "Vorschau", - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": - "Der PATH muss bei PrivateBin mit einem \"%s\" enden. Bitte passe Deinen PATH in Deiner index.php an.", + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": + "Der PATH muss bei %s mit einem \"%s\" enden. Bitte passe Deinen PATH in Deiner index.php an.", "Decrypt": "Entschlüsseln", "Enter password": diff --git a/i18n/es.json b/i18n/es.json index 42857ef..61b1540 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -1,11 +1,16 @@ { + "PrivateBin": "PrivateBin", + "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": + "%s es un servicio de tipo \"Pastebin\" minimalista de código abierto, donde el servidor no tiene ningún conocimiento de los datos guardados. Los datos son cifrados/descifrados en el navegador usando 256 bits AES. Más información en la página del proyecto.", + "Because ignorance is bliss": + "Porque la ignorancia es dicha", "en": "es", "Paste does not exist, has expired or has been deleted.": "El texto no existe, ha caducado o ha sido eliminado.", - "PrivateBin requires php 5.3.0 or above to work. Sorry.": - "PrivateBin requiere php 5.3.0 o superior para funcionar. Lo siento.", - "PrivateBin requires configuration section [%s] to be present in configuration file.": - "PrivateBin requiere que la sección de configuración [% s] esté presente en el archivo de configuración.", + "%s requires php 5.3.0 or above to work. Sorry.": + "%s requiere php 5.3.0 o superior para funcionar. Lo siento.", + "%s requires configuration section [%s] to be present in configuration file.": + "%s requiere que la sección de configuración [% s] esté presente en el archivo de configuración.", "Please wait %d seconds between each post.": "Por favor espere %d segundos entre cada publicación.", "Paste is limited to %s of encrypted data.": @@ -26,15 +31,10 @@ "Token de eliminación erróneo. El texto no fue eliminado.", "Paste was properly deleted.": "El texto se ha eliminado correctamente.", - "PrivateBin": "PrivateBin", - "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": - "PrivateBin es un servicio de tipo \"Pastebin\" minimalista de código abierto, donde el servidor no tiene ningún conocimiento de los datos guardados. Los datos son cifrados/descifrados en el navegador usando 256 bits AES. Más información en la página del proyecto.", - "Because ignorance is bliss": - "Porque la ignorancia es dicha", - "JavaScript is required for PrivateBin to work.
Sorry for the inconvenience.": - "JavaScript es necesario para que PrivateBin funcione.
Sentimos los inconvenientes ocasionados.", - "PrivateBin requires a modern browser to work.": - "PrivateBin requiere un navegador moderno para funcionar.", + "JavaScript is required for %s to work.
Sorry for the inconvenience.": + "JavaScript es necesario para que %s funcione.
Sentimos los inconvenientes ocasionados.", + "%s requires a modern browser to work.": + "%s requiere un navegador moderno para funcionar.", "Still using Internet Explorer? Do yourself a favor, switch to a modern browser:": "¿Sigues usando Internet Explorer? Hazte un favor, cambia a un navegador moderno:", "New": @@ -139,8 +139,8 @@ "Shorten URL": "Acortar URL", "Editor": "Editor", "Preview": "Previsualización", - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": - "PrivateBin requiere que el PATH termine en \"%s\". Por favor, actualice el PATH en su index.php.", + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": + "%s requiere que el PATH termine en \"%s\". Por favor, actualice el PATH en su index.php.", "Decrypt": "Descifrar", "Enter password": diff --git a/i18n/fr.json b/i18n/fr.json index 263c1dd..89a4504 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -1,11 +1,16 @@ { + "PrivateBin": "PrivateBin", + "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": + "%s est un 'pastebin' (ou gestionnaire d'extraits de texte et de code source) minimaliste et open source, dans lequel le serveur n'a aucune connaissance des données envoyées. Les données sont chiffrées/déchiffrées dans le navigateur par un chiffrage AES 256 bits. Plus d'informations sur la page du projet.", + "Because ignorance is bliss": + "Parce que l'ignorance c'est le bonheur", "en": "fr", "Paste does not exist, has expired or has been deleted.": "Le paste n'existe pas, a expiré, ou a été supprimé.", - "PrivateBin requires php 5.3.0 or above to work. Sorry.": - "Désolé, PrivateBin nécessite php 5.3.0 ou supérieur pour fonctionner.", - "PrivateBin requires configuration section [%s] to be present in configuration file.": - "PrivateBin a besoin de la section de configuration [%s] dans le fichier de configuration pour fonctionner.", + "%s requires php 5.3.0 or above to work. Sorry.": + "Désolé, %s nécessite php 5.3.0 ou supérieur pour fonctionner.", + "%s requires configuration section [%s] to be present in configuration file.": + "%s a besoin de la section de configuration [%s] dans le fichier de configuration pour fonctionner.", "Please wait %d seconds between each post.": "Merci d'attendre %d secondes entre chaque publication.", "Paste is limited to %s of encrypted data.": @@ -26,15 +31,10 @@ "Jeton de suppression incorrect. Le paste n'a pas été supprimé.", "Paste was properly deleted.": "Le paste a été correctement supprimé.", - "PrivateBin": "PrivateBin", - "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": - "PrivateBin est un 'pastebin' (ou gestionnaire d'extraits de texte et de code source) minimaliste et open source, dans lequel le serveur n'a aucune connaissance des données envoyées. Les données sont chiffrées/déchiffrées dans le navigateur par un chiffrage AES 256 bits. Plus d'informations sur la page du projet.", - "Because ignorance is bliss": - "Parce que l'ignorance c'est le bonheur", - "JavaScript is required for PrivateBin to work.
Sorry for the inconvenience.": - "JavaScript est requis pour faire fonctionner PrivateBin.
Désolé pour cet inconvénient.", - "PrivateBin requires a modern browser to work.": - "PrivateBin nécessite un navigateur moderne pour fonctionner.", + "JavaScript is required for %s to work.
Sorry for the inconvenience.": + "JavaScript est requis pour faire fonctionner %s.
Désolé pour cet inconvénient.", + "%s requires a modern browser to work.": + "%s nécessite un navigateur moderne pour fonctionner.", "Still using Internet Explorer? Do yourself a favor, switch to a modern browser:": "Encore sur Internet Explorer ? Faites-vous une faveur, passez à un navigateur moderne :", "New": @@ -148,8 +148,8 @@ "Shorten URL": "Raccourcir URL", "Editor": "Éditer", "Preview": "Prévisualiser", - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.", + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.", "Decrypt": "Decrypt", "Enter password": diff --git a/i18n/it.json b/i18n/it.json index 5c5aae3..24b79ec 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -1,11 +1,16 @@ { + "PrivateBin": "PrivateBin", + "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": + "%s è un sistema di tipo \"Pastebin\" online, open source, minimalista. Il server non possiede alcuna conoscenza (\"Zero Knowledge\") del contenuto dei dati inviati. I dati sono cifrati/decifrati nel Browser con algoritmo AES a 256 Bit. Per ulteriori informazioni, vedi Sito del progetto.", + "Because ignorance is bliss": + "Perché l'ignoranza è una benedizione (Because ignorance is bliss)", "en": "it", "Paste does not exist, has expired or has been deleted.": "Questo messaggio non esiste, è scaduto o è stato cancellato.", - "PrivateBin requires php 5.3.0 or above to work. Sorry.": - "PrivateBin richiede PHP 5.3.0 o superiore.", - "PrivateBin requires configuration section [%s] to be present in configuration file.": - "PrivateBin richiede la presenza della sezione [%s] nei file di configurazione.", + "%s requires php 5.3.0 or above to work. Sorry.": + "%s richiede PHP 5.3.0 o superiore.", + "%s requires configuration section [%s] to be present in configuration file.": + "%s richiede la presenza della sezione [%s] nei file di configurazione.", "Please wait %d seconds between each post.": "Attendi per favore %d secondi prima di ciascun invio.", "Paste is limited to %s of encrypted data.": @@ -26,15 +31,10 @@ "Codice cancellazione errato. Il messaggio NON è stato cancellato.", "Paste was properly deleted.": "Il messaggio è stato correttamente cancellato.", - "PrivateBin": "PrivateBin", - "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": - "PrivateBin è un sistema di tipo \"Pastebin\" online, open source, minimalista. Il server non possiede alcuna conoscenza (\"Zero Knowledge\") del contenuto dei dati inviati. I dati sono cifrati/decifrati nel Browser con algoritmo AES a 256 Bit. Per ulteriori informazioni, vedi Sito del progetto.", - "Because ignorance is bliss": - "Perché l'ignoranza è una benedizione (Because ignorance is bliss)", - "JavaScript is required for PrivateBin to work.
Sorry for the inconvenience.": - "PrivateBin funziona solo con JavaScript attivo.
Ci dispiace per l'inconveniente.", - "PrivateBin requires a modern browser to work.": - "PrivateBin richiede un browser moderno e aggiornato per funzionare.", + "JavaScript is required for %s to work.
Sorry for the inconvenience.": + "%s funziona solo con JavaScript attivo.
Ci dispiace per l'inconveniente.", + "%s requires a modern browser to work.": + "%s richiede un browser moderno e aggiornato per funzionare.", "Still using Internet Explorer? Do yourself a favor, switch to a modern browser:": "Usi ancora Internet Explorer? Ti consigliamo di passare ad un browser più sicuro:", "New": @@ -139,8 +139,8 @@ "Shorten URL": "Accorcia URL", "Editor": "Editor", "Preview": "Preview", - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": - "PrivateBin necessita che PATH termini con \"%s\". Aggiorna la variabile PATH nel tuo index.php.", + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": + "%s necessita che PATH termini con \"%s\". Aggiorna la variabile PATH nel tuo index.php.", "Decrypt": "Decrypt", "Enter password": diff --git a/i18n/pl.json b/i18n/pl.json index 8c34f60..2757439 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -1,11 +1,16 @@ { + "PrivateBin": "PrivateBin", + "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": + "%s jest minimalistycznym, otwartoźródłowym serwisem typu pastebin, w którym serwer nie ma jakichkolwiek informacji o tym, co jest wklejane. Dane są szyfrowane i deszyfrowane w przeglądarce z użyciem 256-bitowego klucza AES. Więcej informacji na stronie projektu.", + "Because ignorance is bliss": + "Ponieważ ignorancja jest cnotą", "en": "pl", "Paste does not exist, has expired or has been deleted.": "Wklejka nie istnieje, wygasła albo została usunięta.", - "PrivateBin requires php 5.3.0 or above to work. Sorry.": - "PrivateBin wymaga PHP w wersji 5.3.0 lub nowszej, sorry.", - "PrivateBin requires configuration section [%s] to be present in configuration file.": - "PrivateBin wymaga obecności sekcji [%s] w pliku konfiguracyjnym.", + "%s requires php 5.3.0 or above to work. Sorry.": + "%s wymaga PHP w wersji 5.3.0 lub nowszej, sorry.", + "%s requires configuration section [%s] to be present in configuration file.": + "%s wymaga obecności sekcji [%s] w pliku konfiguracyjnym.", "Please wait %d seconds between each post.": "Poczekaj %d sekund pomiędzy każdą wklejką.", "Paste is limited to %s of encrypted data.": @@ -26,15 +31,10 @@ "Nieprawidłowy token usuwania. Wklejka nie została usunięta.", "Paste was properly deleted.": "Wklejka usunięta poprawnie.", - "PrivateBin": "PrivateBin", - "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": - "PrivateBin jest minimalistycznym, otwartoźródłowym serwisem typu pastebin, w którym serwer nie ma jakichkolwiek informacji o tym, co jest wklejane. Dane są szyfrowane i deszyfrowane w przeglądarce z użyciem 256-bitowego klucza AES. Więcej informacji na stronie projektu.", - "Because ignorance is bliss": - "Ponieważ ignorancja jest cnotą", - "JavaScript is required for PrivateBin to work.
Sorry for the inconvenience.": - "Do działania PrivateBina jest wymagany JavaScript. Przepraszamy za tę niedogodność.", - "PrivateBin requires a modern browser to work.": - "PrivateBin wymaga do działania nowoczesnej przeglądarki.", + "JavaScript is required for %s to work.
Sorry for the inconvenience.": + "Do działania %sa jest wymagany JavaScript. Przepraszamy za tę niedogodność.", + "%s requires a modern browser to work.": + "%s wymaga do działania nowoczesnej przeglądarki.", "Still using Internet Explorer? Do yourself a favor, switch to a modern browser:": "Cały czas używasz Internet Explorera? Zrób sobie przysługę, przesiądź się na nowoczesną przeglądarkę:", "New": @@ -139,8 +139,8 @@ "Shorten URL": "Skróć adres URL", "Editor": "Edytować", "Preview": "Zapowiedź", - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.", + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.", "Decrypt": "Decrypt", "Enter password": diff --git a/i18n/ru.json b/i18n/ru.json index 954263e..63b4ac7 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -1,11 +1,16 @@ { + "PrivateBin": "PrivateBin", + "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": + "%s это минималистичный Open Source проект для создания заметок, где сервер не знает ничего о сохраняемых данных. Данные шифруются/расшифровываются в браузере с использованием 256 битного шифрования AES. Подробнее можно узнать на сайте проекта.", + "Because ignorance is bliss": + "Потому что неведение - благо", "en": "ru", "Paste does not exist, has expired or has been deleted.": "Запись не существует, просрочена или была удалена.", - "PrivateBin requires php 5.3.0 or above to work. Sorry.": - "Для работы PrivateBin требуется PHP 5.3.0 или выше. Извините.", - "PrivateBin requires configuration section [%s] to be present in configuration file.": - "PrivateBin необходимо наличие секции [%s] в конфигурационном файле.", + "%s requires php 5.3.0 or above to work. Sorry.": + "Для работы %s требуется PHP 5.3.0 или выше. Извините.", + "%s requires configuration section [%s] to be present in configuration file.": + "%s необходимо наличие секции [%s] в конфигурационном файле.", "Please wait %d seconds between each post.": ["Пожалуйста ожидайте %d секунду между каждыми записями.", "Пожалуйста ожидайте %d секунды между каждыми записями.", "Пожалуйста ожидайте %d секунд между каждыми записями."], "Paste is limited to %s of encrypted data.": @@ -26,15 +31,10 @@ "Неверный ключ удаления записи. Запись не удалена", "Paste was properly deleted.": "Запись была успешно удалена.", - "PrivateBin": "PrivateBin", - "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": - "PrivateBin это минималистичный Open Source проект для создания заметок, где сервер не знает ничего о сохраняемых данных. Данные шифруются/расшифровываются в браузере с использованием 256 битного шифрования AES. Подробнее можно узнать на сайте проекта.", - "Because ignorance is bliss": - "Потому что неведение - благо", - "JavaScript is required for PrivateBin to work.
Sorry for the inconvenience.": - "Для работы PrivateBin требуется включенный JavaScript.
Приносим извинения за неудобства..", - "PrivateBin requires a modern browser to work.": - "Для работы PrivateBin требуется более современный браузер.", + "JavaScript is required for %s to work.
Sorry for the inconvenience.": + "Для работы %s требуется включенный JavaScript.
Приносим извинения за неудобства..", + "%s requires a modern browser to work.": + "Для работы %s требуется более современный браузер.", "Still using Internet Explorer? Do yourself a favor, switch to a modern browser:": "До сих пор используете Internet Explorer? Пожалейте себя, перейдите на более современный браузер:", "New": @@ -148,8 +148,8 @@ "Shorten URL": "Короткая ссылка", "Editor": "Редактор", "Preview": "Предпросмотр", - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": - "Переменная PATH необходима PrivateBin в конце \"%s\". Пожалуйста обновите переменную PATH в вашем index.php.", + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": + "Переменная PATH необходима %s в конце \"%s\". Пожалуйста обновите переменную PATH в вашем index.php.", "Decrypt": "Расшифровать", "Enter password": diff --git a/i18n/sl.json b/i18n/sl.json index cf4d317..4cf3d5a 100644 --- a/i18n/sl.json +++ b/i18n/sl.json @@ -1,11 +1,16 @@ { + "PrivateBin": "PrivateBin", + "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": + "%s je minimalističen, odprtokodni spletni 'pastebin', kjer server ne ve ničesar o prilepljenih podatkih. Podatki so zakodirani/odkodirani v brskalniku z uporabo 256 bitnega AES. Več informacij na < href=\"https://privatebin.info/\">spletni strani projekta..", + "Because ignorance is bliss": + "Ker kar ne veš ne boli.", "en": "sl", "Paste does not exist, has expired or has been deleted.": "Prilepek ne obstaja, mu je potekla življenjska doba, ali pa je izbrisan.", - "PrivateBin requires php 5.3.0 or above to work. Sorry.": - "Oprosti, PrivateBin za delovanje potrebuje vsaj php 5.3.0.", - "PrivateBin requires configuration section [%s] to be present in configuration file.": - "PrivateBin potrebuje sekcijo konfiguracij [%s] v konfiguracijski datoteki.", + "%s requires php 5.3.0 or above to work. Sorry.": + "Oprosti, %s za delovanje potrebuje vsaj php 5.3.0.", + "%s requires configuration section [%s] to be present in configuration file.": + "%s potrebuje sekcijo konfiguracij [%s] v konfiguracijski datoteki.", "Please wait %d seconds between each post.": "Prosim počakaj vsaj %d sekund pred vsako naslednjo objavo.", "Paste is limited to %s of encrypted data.": @@ -26,15 +31,10 @@ "Napačen token za izbris. Prilepek ni bil izbrisan..", "Paste was properly deleted.": "Prilepek je uspešno izbrisan.", - "PrivateBin": "PrivateBin", - "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": - "PrivateBin je minimalističen, odprtokodni spletni 'pastebin', kjer server ne ve ničesar o prilepljenih podatkih. Podatki so zakodirani/odkodirani v brskalniku z uporabo 256 bitnega AES. Več informacij na < href=\"https://privatebin.info/\">spletni strani projekta..", - "Because ignorance is bliss": - "Ker kar ne veš ne boli.", - "JavaScript is required for PrivateBin to work.
Sorry for the inconvenience.": - "Da PrivateBin deluje, moraš vklopiti JavaScript.
Oprosti za povročene nevšečnosti.", - "PrivateBin requires a modern browser to work.": - "PrivateBin za svoje delovanje potrebuje moderen brskalnik.", + "JavaScript is required for %s to work.
Sorry for the inconvenience.": + "Da %s deluje, moraš vklopiti JavaScript.
Oprosti za povročene nevšečnosti.", + "%s requires a modern browser to work.": + "%s za svoje delovanje potrebuje moderen brskalnik.", "Still using Internet Explorer? Do yourself a favor, switch to a modern browser:": "Še vedno uporabljaš Internet Explorer? Naredi si uslugo, preklopi na moderen brskalnik:", "New": @@ -148,8 +148,8 @@ "Shorten URL": "Skrajšajte URL", "Editor": "Uredi", "Preview": "Predogled", - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.", + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.", "Decrypt": "Decrypt", "Enter password": diff --git a/i18n/zh.json b/i18n/zh.json index 1a88f2f..a1a9b96 100644 --- a/i18n/zh.json +++ b/i18n/zh.json @@ -1,11 +1,16 @@ { + "PrivateBin": "PrivateBin", + "%s is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": + "%s是一个极简,开源,对粘贴内容毫不知情的在线粘贴板,数据在浏览器内进行AES-256加密。更多信息请查看项目主页。", + "Because ignorance is bliss": + "因为无知是福", "en": "zh", "Paste does not exist, has expired or has been deleted.": "粘贴不存在,已过期或者已被删除。", - "PrivateBin requires php 5.3.0 or above to work. Sorry.": - "PrivateBin需要工作于PHP 5.3.0及以上版本,抱歉。", - "PrivateBin requires configuration section [%s] to be present in configuration file.": - "PrivateBin需要设置配置文件中 [%s] 的部分。", + "%s requires php 5.3.0 or above to work. Sorry.": + "%s需要工作于PHP 5.3.0及以上版本,抱歉。", + "%s requires configuration section [%s] to be present in configuration file.": + "%s需要设置配置文件中 [%s] 的部分。", "Please wait %d seconds between each post.": "每 %d 秒只能粘贴一次。", "Paste is limited to %s of encrypted data.": @@ -26,15 +31,10 @@ "错误的删除token,粘贴没有被删除。", "Paste was properly deleted.": "粘贴已被正确删除。", - "PrivateBin": "PrivateBin", - "PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256 bits AES. More information on the project page.": - "PrivateBin是一个极简,开源,对粘贴内容毫不知情的在线粘贴板,数据在浏览器内进行AES-256加密。更多信息请查看项目主页。", - "Because ignorance is bliss": - "因为无知是福", - "JavaScript is required for PrivateBin to work.
Sorry for the inconvenience.": - "PrivateBin需要JavaScript来进行加解密。
带来的不便敬请谅解。", - "PrivateBin requires a modern browser to work.": - "PrivateBin需要工作于现代化的浏览器。", + "JavaScript is required for %s to work.
Sorry for the inconvenience.": + "%s需要JavaScript来进行加解密。
带来的不便敬请谅解。", + "%s requires a modern browser to work.": + "%s需要工作于现代化的浏览器。", "Still using Internet Explorer? Do yourself a favor, switch to a modern browser:": "还在使用Internet Explorer?帮自己个忙,换上一个现代化的浏览器:", "New": @@ -139,8 +139,8 @@ "Shorten URL": "缩短链接", "Editor": "編輯", "Preview": "預習", - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": - "PrivateBin requires the PATH to end in a \"%s\". Please update the PATH in your index.php.", + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": + "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.", "Decrypt": "Decrypt", "Enter password": diff --git a/lib/Configuration.php b/lib/Configuration.php index e48f290..800ea75 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -36,6 +36,7 @@ class Configuration */ private static $_defaults = array( 'main' => array( + 'name' => 'PrivateBin', 'discussion' => true, 'opendiscussion' => false, 'password' => true, @@ -239,7 +240,7 @@ class Configuration public function getSection($section) { if (!array_key_exists($section, $this->_configuration)) { - throw new Exception(I18n::_('PrivateBin requires configuration section [%s] to be present in configuration file.', $section), 3); + throw new Exception(I18n::_('%s requires configuration section [%s] to be present in configuration file.', I18n::_($this->getKey('name')), $section), 3); } return $this->_configuration[$section]; } diff --git a/lib/PrivateBin.php b/lib/PrivateBin.php index 7a2cdb4..e754016 100644 --- a/lib/PrivateBin.php +++ b/lib/PrivateBin.php @@ -121,10 +121,10 @@ class PrivateBin public function __construct() { if (version_compare(PHP_VERSION, '5.3.0') < 0) { - throw new Exception(I18n::_('PrivateBin requires php 5.3.0 or above to work. Sorry.'), 1); + throw new Exception(I18n::_('%s requires php 5.3.0 or above to work. Sorry.', I18n::_('PrivateBin')), 1); } if (strlen(PATH) < 0 && substr(PATH, -1) !== DIRECTORY_SEPARATOR) { - throw new Exception(I18n::_('PrivateBin requires the PATH to end in a "%s". Please update the PATH in your index.php.', DIRECTORY_SEPARATOR), 5); + throw new Exception(I18n::_('%s requires the PATH to end in a "%s". Please update the PATH in your index.php.', I18n::_('PrivateBin'), DIRECTORY_SEPARATOR), 5); } // load config from ini file, initialize required classes @@ -430,6 +430,7 @@ class PrivateBin } $page = new View; + $page->assign('NAME', $this->_conf->getKey('name')); $page->assign('CIPHERDATA', $this->_data); $page->assign('ERROR', I18n::_($this->_error)); $page->assign('STATUS', I18n::_($this->_status)); diff --git a/tpl/bootstrap-compact.php b/tpl/bootstrap-compact.php index 63390dd..cd32bdd 100644 --- a/tpl/bootstrap-compact.php +++ b/tpl/bootstrap-compact.php @@ -8,7 +8,7 @@ use PrivateBin\I18n; - <?php echo I18n::_('PrivateBin'); ?> + <?php echo I18n::_($NAME); ?> @@ -91,7 +91,7 @@ endif; - <?php echo I18n::_('PrivateBin'); ?> + <?php echo I18n::_($NAME); ?> - - + + - - + + - - + + - - + + - - + +