~ahayzen/music-app/refactor-bump-framework-1504

« back to all changes in this revision

Viewing changes to po/po.pro

  • Committer: Victor Thompson
  • Date: 2014-04-27 18:25:48 UTC
  • mto: This revision was merged to the branch mainline in revision 436.
  • Revision ID: victor.thompson@gmail.com-20140427182548-gbz0tjhfj57cb6o5
Update translations to be built with CMake.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
## This .pro file is used to create a Makefile with the necessary rules
2
 
## to create an initial translations template and to update it whenever
3
 
## there are new translatable strings in the project that are ready to be
4
 
## exposed to translators
5
 
##
6
 
## See the ../README.translations file for more information
7
 
 
8
 
TEMPLATE = subdirs
9
 
 
10
 
PROJECTNAME = $$system(basename ../*.qmlproject)
11
 
PROJECTNAME = $$replace(PROJECTNAME,.qmlproject,)
12
 
 
13
 
DESKTOPFILE = ../com.ubuntu.music_music.desktop.in
14
 
 
15
 
SOURCECODE = ../*.qml \
16
 
             ../*.js \
17
 
             ../common/*.qml
18
 
 
19
 
BUILDDIR = ../.build
20
 
DESKTOPFILETEMP = $${BUILDDIR}/com.ubuntu.music_music.desktop.in
21
 
 
22
 
message("")
23
 
message(" Project Name: $$PROJECTNAME ")
24
 
message(" Source Code: $$SOURCECODE ")
25
 
message("")
26
 
message(" Run 'make pot' to generate the pot file from source code. ")
27
 
message("")
28
 
 
29
 
## Generate pot file 'make pot'
30
 
potfile.target = pot
31
 
potfile.commands = xgettext \
32
 
                   -o $${PROJECTNAME}.pot \
33
 
                   --copyright=\"Canonical Ltd. \" \
34
 
                   --package-name $${PROJECTNAME} \
35
 
                   --qt --c++ --add-comments=TRANSLATORS \
36
 
                   --keyword=tr --keyword=tr:1,2 \
37
 
                   $${SOURCECODE} $${DESKTOPFILETEMP}
38
 
potfile.depends = desktopfile
39
 
QMAKE_EXTRA_TARGETS += potfile
40
 
 
41
 
## Do not use this rule directly. It's a dependency rule to
42
 
## generate an intermediate .js file to extract translatable
43
 
## strings from the .desktop file
44
 
desktopfile.target = desktopfile
45
 
desktopfile.commands = awk \'BEGIN { FS=\"=\" }; /Name/ {print \"var s = i18n.tr(\42\" \$$2 \"\42);\"}\' $${DESKTOPFILE} > $${DESKTOPFILETEMP}
46
 
desktopfile.depends = makebuilddir
47
 
QMAKE_EXTRA_TARGETS += desktopfile
48
 
 
49
 
## Dependency rule to create the temporary build dir
50
 
makebuilddir.target = makebuilddir
51
 
makebuilddir.commands = mkdir -p $${BUILDDIR}
52
 
QMAKE_EXTRA_TARGETS += makebuilddir
53
 
 
54
 
## Rule to clean the products of the build
55
 
clean.target = clean
56
 
clean.commands = rm -Rf $${BUILDDIR}
57
 
QMAKE_EXTRA_TARGETS += clean
58