Kaynağa Gözat

Merge branch 'PrivateBin:master' into navigate-after-delete

theProton 1 yıl önce
ebeveyn
işleme
922971590e
8 değiştirilmiş dosya ile 32 ekleme ve 31 silme
  1. 5 5
      i18n/oc.json
  2. 18 18
      i18n/pl.json
  3. 1 1
      tpl/bootstrap.php
  4. 1 1
      tpl/bootstrap5.php
  5. 1 1
      tpl/page.php
  6. 1 1
      tpl/yourlsproxy.php
  7. 1 0
      tst/Data/FilesystemTest.php
  8. 4 4
      tst/I18nTest.php

+ 5 - 5
i18n/oc.json

@@ -215,9 +215,9 @@
     "Trying to shorten a URL that isn't pointing at our instance.": "Ensag d’abracar una URL que mena pas a nòstra instància.",
     "Error calling YOURLS. Probably a configuration issue, like wrong or missing \"apiurl\" or \"signature\".": "Error en cridant YOURLS. Es probablament un problèma de configuracion, quicòm coma « apirul » o « signature » marrit o absent.",
     "Error parsing YOURLS response.": "Error d'analisi de la responsa YOURLS.",
-    "This secret message can only be displayed once. Would you like to see it now?": "This secret message can only be displayed once. Would you like to see it now?",
-    "Yes, see it": "Yes, see it",
-    "Dark Mode": "Dark Mode",
-    "Error compressing paste, due to missing WebAssembly support.": "Error compressing paste, due to missing WebAssembly support.",
-    "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste."
+    "This secret message can only be displayed once. Would you like to see it now?": "Aqueste messatge secrèt se pòt pas qu'afichar un còp. Lo volètz veire ara ?",
+    "Yes, see it": "Òc, afichatz-lo",
+    "Dark Mode": "Mòde escur",
+    "Error compressing paste, due to missing WebAssembly support.": "Error al moment de la compression de l'empegatge, a causa de la manca de presa en carga de WebAssembly.",
+    "Error decompressing paste, your browser does not support WebAssembly. Please use another browser to view this paste.": "Error al moment de descompresar l'empegatge, vòstre navegador pren pas en carga WebAssembly. Mercés d'utilizar un autre navigador per visualizar aquesta pega."
 }

+ 18 - 18
i18n/pl.json

@@ -167,7 +167,7 @@
     "Format": "Format",
     "Plain Text": "Czysty tekst",
     "Source Code": "Kod źródłowy",
-    "Markdown": "Markdown",
+    "Markdown": "Znakowanie",
     "Download attachment": "Pobierz załącznik",
     "Cloned: '%s'": "Sklonowano: '%s'",
     "The cloned file '%s' was attached to this paste.": "Sklonowany plik '%s' był dołączony do tej wklejki.",
@@ -181,7 +181,7 @@
     "Shorten URL": "Skróć adres URL",
     "Editor": "Edytować",
     "Preview": "Podgląd",
-    "%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.",
+    "%s requires the PATH to end in a \"%s\". Please update the PATH in your index.php.": "%s wymaga zmiennej PATH zakończonej w \"%s\". Zaktualizuj zmienną PATH w index.php.",
     "Decrypt": "Odszyfruj",
     "Enter password": "Wpisz hasło",
     "Loading…": "Wczytywanie…",
@@ -191,22 +191,22 @@
     "+++ no paste text +++": "+++ brak wklejonego tekstu +++",
     "Could not get paste data: %s": "Nie można było pobrać danych wklejki: %s",
     "QR code": "Kod QR",
-    "This website is using an insecure HTTP connection! Please use it only for testing.": "This website is using an insecure HTTP connection! Please use it only for testing.",
-    "For more information <a href=\"%s\">see this FAQ entry</a>.": "For more information <a href=\"%s\">see this FAQ entry</a>.",
-    "Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.": "Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.",
-    "Your browser doesn't support WebAssembly, used for zlib compression. You can create uncompressed documents, but can't read compressed ones.": "Your browser doesn't support WebAssembly, used for zlib compression. You can create uncompressed documents, but can't read compressed ones.",
-    "waiting on user to provide a password": "waiting on user to provide a password",
-    "Could not decrypt data. Did you enter a wrong password? Retry with the button at the top.": "Could not decrypt data. Did you enter a wrong password? Retry with the button at the top.",
-    "Retry": "Retry",
-    "Showing raw text…": "Showing raw text…",
-    "Notice:": "Notice:",
-    "This link will expire after %s.": "This link will expire after %s.",
-    "This link can only be accessed once, do not use back or refresh button in your browser.": "This link can only be accessed once, do not use back or refresh button in your browser.",
-    "Link:": "Link:",
-    "Recipient may become aware of your timezone, convert time to UTC?": "Recipient may become aware of your timezone, convert time to UTC?",
-    "Use Current Timezone": "Use Current Timezone",
-    "Convert To UTC": "Convert To UTC",
-    "Close": "Close",
+    "This website is using an insecure HTTP connection! Please use it only for testing.": "Ta witryna używa niezabezpieczonego połączenia HTTP! Używaj jej wyłącznie do testowania.",
+    "For more information <a href=\"%s\">see this FAQ entry</a>.": "Aby uzyskać więcej informacji, <a href=\"%s\">sprawdź to często zadawane pytanie</a>.",
+    "Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href=\"%s\">switching to HTTPS</a>.": "Twoja przeglądarka może wymagać połączenia HTTPS do obsługi API WebCrypto. Wypróbuj <a href=\"%s\">przełączenie na HTTPS</a>.",
+    "Your browser doesn't support WebAssembly, used for zlib compression. You can create uncompressed documents, but can't read compressed ones.": "Twoja przeglądarka nie obsługuje WebAssembly używanego do kompresji zlib. Możesz utworzyć nieskompresowane dokumenty, ale nie możesz odczytać skompresowanych.",
+    "waiting on user to provide a password": "oczekiwanie na podanie hasła przez użytkownika",
+    "Could not decrypt data. Did you enter a wrong password? Retry with the button at the top.": "Błąd odszyfrowywania danych. Czy wprowadzono niepoprawne hasło? Spróbuj ponownie, używając przycisku na górze.",
+    "Retry": "Ponów",
+    "Showing raw text…": "Pokazywanie nieprzetworzonego tekstu…",
+    "Notice:": "Uwaga:",
+    "This link will expire after %s.": "Ten odnośnik wygaśnie po %s.",
+    "This link can only be accessed once, do not use back or refresh button in your browser.": "Tego odnośnika można użyć tylko jeden raz. Nie cofaj ani nie odświeżaj strony w przeglądarce.",
+    "Link:": "Odnośnik:",
+    "Recipient may become aware of your timezone, convert time to UTC?": "Odbiorca może uzyskać informację o twojej strefie czasowej. Zamienić czas na UTC?",
+    "Use Current Timezone": "Użyj bieżącej strefy czasowej",
+    "Convert To UTC": "Zamień na UTC",
+    "Close": "Zamknij",
     "Encrypted note on %s": "Encrypted note on %s",
     "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.": "Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.",
     "URL shortener may expose your decrypt key in URL.": "URL shortener may expose your decrypt key in URL.",

+ 1 - 1
tpl/bootstrap.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 use PrivateBin\I18n;
 $isCpct = substr($template, 9, 8) === '-compact';
 $isDark = substr($template, 9, 5) === '-dark';

+ 1 - 1
tpl/bootstrap5.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 use PrivateBin\I18n;
 ?><!DOCTYPE html>
 <html lang="<?php echo I18n::getLanguage(); ?>"<?php echo I18n::isRtl() ? ' dir="rtl"' : ''; ?>>

+ 1 - 1
tpl/page.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 use PrivateBin\I18n;
 ?><!DOCTYPE html>
 <html lang="<?php echo I18n::getLanguage(); ?>"<?php echo I18n::isRtl() ? ' dir="rtl"' : ''; ?>>

+ 1 - 1
tpl/yourlsproxy.php

@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
 use PrivateBin\I18n;
 ?><!DOCTYPE html>
 <html lang="<?php echo I18n::getLanguage(); ?>"<?php echo I18n::isRtl() ? ' dir="rtl"' : ''; ?>>

+ 1 - 0
tst/Data/FilesystemTest.php

@@ -162,6 +162,7 @@ class FilesystemTest extends TestCase
         // check that all 10 pastes were converted after the purge
         $this->_model->purge(10);
         foreach ($ids as $dataid => $storagedir) {
+            $dataid = (string) $dataid; // undue potential key cast, see https://www.php.net/manual/en/language.types.array.php
             $this->assertFileExists($storagedir . $dataid . '.php', "paste $dataid exists in new format");
             $this->assertFileDoesNotExist($storagedir . $dataid, "old format paste $dataid got removed");
             $this->assertTrue($this->_model->exists($dataid), "paste $dataid exists");

+ 4 - 4
tst/I18nTest.php

@@ -154,10 +154,10 @@ class I18nTest extends TestCase
         $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'cs;q=0.8,en-GB;q=0.6,en-US;q=0.4,en;q=0.2';
         I18n::loadTranslations();
         $this->assertEquals('cs', I18n::getLanguage(), 'browser language cs');
-        $this->assertEquals('1 hodina', I18n::_('%d hours', 1), '1 hour in Czech');
-        $this->assertEquals('2 hodiny', I18n::_('%d hours', 2), '2 hours in Czech');
-        $this->assertEquals('5 minut',  I18n::_('%d minutes', 5), '5 minutes in Czech');
-        $this->assertEquals('14 minut',  I18n::_('%d minutes', 14), '14 minutes in Czech');
+        $this->assertEquals('1 hodina', I18n::_('%d hours', 1), '1 hour in Czech');
+        $this->assertEquals('2 hodiny', I18n::_('%d hours', 2), '2 hours in Czech');
+        $this->assertEquals('5 minut',  I18n::_('%d minutes', 5), '5 minutes in Czech');
+        $this->assertEquals('14 minut',  I18n::_('%d minutes', 14), '14 minutes in Czech');
     }
 
     public function testBrowserLanguageAnyDetection()