]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Languages.php
lint: fix line-length warnings
[github/shaarli/Shaarli.git] / application / Languages.php
index db4b84aea23a0e8862e9b41afb1c3c5aec233328..b9c5d0e8c3cbf627a590516d448ab9c85343a4fb 100644 (file)
@@ -92,7 +92,7 @@ class Languages
     /**
      * Initialize the translator using php gettext extension (gettext dependency act as a wrapper).
      */
-    protected function initGettextTranslator ()
+    protected function initGettextTranslator()
     {
         $this->translator = new GettextTranslator();
         $this->translator->setLanguage($this->language);
@@ -125,7 +125,8 @@ class Languages
             $translations = $translations->addFromPoFile('inc/languages/'. $this->language .'/LC_MESSAGES/shaarli.po');
             $translations->setDomain('shaarli');
             $this->translator->loadTranslations($translations);
-        } catch (\InvalidArgumentException $e) {}
+        } catch (\InvalidArgumentException $e) {
+        }
 
         // Default extension translation from the current theme
         $theme = $this->conf->get('theme');
@@ -137,7 +138,8 @@ class Languages
                 );
                 $translations->setDomain($theme);
                 $this->translator->loadTranslations($translations);
-            } catch (\InvalidArgumentException $e) {}
+            } catch (\InvalidArgumentException $e) {
+            }
         }
 
         // Extension translations (plugins, themes, etc.).
@@ -147,10 +149,13 @@ class Languages
             }
 
             try {
-                $extension = Translations::fromPoFile($translationPath . $this->language .'/LC_MESSAGES/'. $domain .'.po');
+                $extension = Translations::fromPoFile(
+                    $translationPath . $this->language .'/LC_MESSAGES/'. $domain .'.po'
+                );
                 $extension->setDomain($domain);
                 $this->translator->loadTranslations($extension);
-            } catch (\InvalidArgumentException $e) {}
+            } catch (\InvalidArgumentException $e) {
+            }
         }
     }
 
@@ -177,6 +182,7 @@ class Languages
             'auto' => t('Automatic'),
             'en' => t('English'),
             'fr' => t('French'),
+            'de' => t('German'),
         ];
     }
 }