]> git.pld-linux.org Git - packages/clementine.git/commitdiff
- Set LANGUAGES dynamically at build time, this allows easily add new languages just...
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 20 Oct 2010 10:12:49 +0000 (10:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    build-languages-dynamic.patch -> 1.1

build-languages-dynamic.patch [new file with mode: 0644]

diff --git a/build-languages-dynamic.patch b/build-languages-dynamic.patch
new file mode 100644 (file)
index 0000000..2a6841e
--- /dev/null
@@ -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@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 "")
This page took 0.079627 seconds and 4 git commands to generate.