packages: clementine/build-languages-dynamic.patch (NEW) - Set LANGUAGES dy...

glen glen at pld-linux.org
Wed Oct 20 12:12:54 CEST 2010


Author: glen                         Date: Wed Oct 20 10:12:54 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- Set LANGUAGES dynamically at build time, this allows easily add new languages just by placing .po into src/translations dir

---- Files affected:
packages/clementine:
   build-languages-dynamic.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/clementine/build-languages-dynamic.patch
diff -u /dev/null packages/clementine/build-languages-dynamic.patch:1.1
--- /dev/null	Wed Oct 20 12:12:54 2010
+++ packages/clementine/build-languages-dynamic.patch	Wed Oct 20 12:12:49 2010
@@ -0,0 +1,54 @@
+Set LANGUAGES dynamically at build time, this allows easily add new languages
+just by placing .po into src/translations dir
+
+Author: Elan Ruusamäe <glen at delfi.ee>
+--- clementine-0.5.3/src/CMakeLists.txt~	2010-10-20 13:10:28.276756134 +0300
++++ clementine-0.5.3/src/CMakeLists.txt	2010-10-20 13:10:33.456551043 +0300
+@@ -327,41 +327,12 @@
+ 
+ set(LINGUAS "All" CACHE STRING "A space-seperated list of translations to compile in to Clementine, or \"None\".")
+ if (LINGUAS STREQUAL "All")
+-  set (LANGUAGES
+-    ar
+-    bg
+-    ca
+-    cs
+-    da
+-    de
+-    el
+-    en_CA
+-    en_GB
+-    es
+-    fi
+-    fr
+-    gl
+-    hu
+-    it
+-    kk
+-    lt
+-    nb
+-    nl
+-    oc
+-    pl
+-    pt
+-    pt_BR
+-    ro
+-    ru
+-    sk
+-    sl
+-    sr
+-    sv
+-    tr
+-    uk
+-    zh_CN
+-    zh_TW
+-  )
++  # build LANGUAGES from all existing .po files
++  file(GLOB pofiles translations/*.po)
++  foreach(pofile ${pofiles})
++    get_filename_component(lang ${pofile} NAME_WE)
++    list(APPEND LANGUAGES ${lang})
++  endforeach(pofile)
+ else (LINGUAS STREQUAL "All")
+   if (NOT LINGUAS OR LINGUAS STREQUAL "None")
+     set (LANGUAGES "")
================================================================


More information about the pld-cvs-commit mailing list