[Pkg-owncloud-commits] [owncloud-doc] 01/11: Document how to change translations within a theme

David Prévot taffit at moszumanska.debian.org
Tue Jun 23 23:11:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud-doc.

commit 57edb2b4d7f32ddd79225a137e443d286f0ed389
Author: Morris Jobke <hey at morrisjobke.de>
Date:   Tue May 5 01:04:43 2015 +0200

    Document how to change translations within a theme
    
    * works for ownCloud until version 7.0
---
 developer_manual/core/theming.rst | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/developer_manual/core/theming.rst b/developer_manual/core/theming.rst
index fc5a76f..aafc4a9 100644
--- a/developer_manual/core/theming.rst
+++ b/developer_manual/core/theming.rst
@@ -43,9 +43,9 @@ Structure
 =========
 
 The folder structure of a theme is exactly the same as the main ownCloud
-structure. You can override js files, images and templates with own versions.
-CSS files are loaded additionally to the default files so you can override CSS
-properties.
+structure. You can override js files, images, translations and templates with
+own versions. CSS files are loaded additionally to the default files so you can
+override CSS properties.
 
 
 How to change images and the logo
@@ -112,6 +112,26 @@ The other major color scheme is the blue header bar on the main navigation page
 This color we will change with the above as well.
 Save the file and refresh the browser for the changes to take effect.
 
+How to change translations
+==========================
+
+You can override the translation of single strings within your theme. Simply
+create the same folder structure within your theme folder for the language file
+you want to override. Only the changed strings need to be added to that file for
+all other terms the shipped translation will be used.
+
+If you want to override the translation of the term "Download" within the
+``files`` app for the language ``de`` you need to create the file
+``themes/THEME_NAME/apps/files/l10n/de.php`` and put the following code in:
+
+.. code-block:: php
+
+  <?php
+  $TRANSLATIONS = array(
+      "Download" => "Herunterladen"
+  );
+  $PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
+
 Testing the new theme out
 =========================
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git



More information about the Pkg-owncloud-commits mailing list