auto-generate qm files

Change-Id: Ib7ddb4e5264f0e25f51a697a4cfebef7d7150fe5
This commit is contained in:
石博文 2015-12-28 13:38:47 +08:00
parent 00e2640558
commit 08eb82d240
Notes: Deepin Code Review 2016-06-14 07:19:47 +00:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: <yangwanqing@linuxdeepin.com>
Submitted-by: <mr.asianwang@gmail.com>
Submitted-at: Mon, 28 Dec 2015 14:13:23 +0800
Reviewed-on: https://cr.deepin.io/10065
Project: dde/dde-dock
Branch: refs/heads/master
4 changed files with 14 additions and 1 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
build*/
*.pro.user*
*.DS_Store
*.qm

View File

@ -4,7 +4,8 @@ SUBDIRS = dde-dock \
dde-dock-shutdown-plugin \
dde-dock-trash-plugin
TRANSLATIONS += translations/dde-dock.ts
# Automating generation .qm files from .ts files
system($$PWD/translate_generation.sh)
qm_files.files += translations/*.qm
qm_files.path = /usr/share/dde-dock/translations/

11
translate_generation.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# this file is used to auto-generate .qm file from .ts file.
# author: shibowen at linuxdeepin.com
ts_list=(`ls translations/*.ts`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
lrelease "${ts}"
done

Binary file not shown.