]> git.pld-linux.org Git - packages/clementine.git/blame - build-languages-dynamic.patch
- release 3
[packages/clementine.git] / build-languages-dynamic.patch
CommitLineData
8119713e
ER
1Set LANGUAGES dynamically at build time, this allows easily add new languages
2just by placing .po into src/translations dir
3
4Author: Elan Ruusamäe <glen@delfi.ee>
5--- clementine-0.5.3/src/CMakeLists.txt~ 2010-10-20 13:10:28.276756134 +0300
6+++ clementine-0.5.3/src/CMakeLists.txt 2010-10-20 13:10:33.456551043 +0300
7@@ -327,41 +327,12 @@
8
9 set(LINGUAS "All" CACHE STRING "A space-seperated list of translations to compile in to Clementine, or \"None\".")
10 if (LINGUAS STREQUAL "All")
11- set (LANGUAGES
12- ar
13- bg
14- ca
15- cs
16- da
17- de
18- el
19- en_CA
20- en_GB
21- es
22- fi
23- fr
24- gl
25- hu
26- it
27- kk
28- lt
29- nb
30- nl
31- oc
32- pl
33- pt
34- pt_BR
35- ro
36- ru
37- sk
38- sl
39- sr
40- sv
41- tr
42- uk
43- zh_CN
44- zh_TW
45- )
46+ # build LANGUAGES from all existing .po files
47+ file(GLOB pofiles translations/*.po)
48+ foreach(pofile ${pofiles})
49+ get_filename_component(lang ${pofile} NAME_WE)
50+ list(APPEND LANGUAGES ${lang})
51+ endforeach(pofile)
52 else (LINGUAS STREQUAL "All")
53 if (NOT LINGUAS OR LINGUAS STREQUAL "None")
54 set (LANGUAGES "")
This page took 0.048261 seconds and 4 git commands to generate.