~libqtelegram-team/telegram-app/reset-emblem-counter

« back to all changes in this revision

Viewing changes to scope/po/CMakeLists.txt

  • Committer: Michał Karnicki
  • Date: 2014-12-08 13:38:37 UTC
  • mfrom: (175.2.1 app-dev-theone)
  • Revision ID: michal.karnicki@canonical.com-20141208133837-md8h3yjbqrsn2v86
Add a scope to Telegram.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include(FindGettext)
 
2
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
 
3
find_program(INTLTOOL_UPDATE intltool-update)
 
4
 
 
5
set(POT_FILE ${GETTEXT_DOMAIN}.pot)
 
6
file(GLOB POFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po)
 
7
 
 
8
# Creates POTFILES
 
9
configure_file(
 
10
    "make-pot.sh.in"
 
11
    "make-pot.sh"
 
12
)
 
13
configure_file(
 
14
    "update-pos-from-pot.sh.in"
 
15
    "update-pos-from-pot.sh"
 
16
)
 
17
 
 
18
# Builds the binary translations catalog for each language
 
19
# it finds source translations (*.po) for
 
20
foreach(POFILE ${POFILES})
 
21
    string(REPLACE ".po" "" LANG ${POFILE})
 
22
    list(APPEND PO_FILES "${POFILE}")
 
23
    set(INSTALL_DIR "${CMAKE_SOURCE_DIR}/scope/po/built_mos/locale/${LANG}/LC_MESSAGES" )
 
24
    exec_program("mkdir -p ${INSTALL_DIR}")
 
25
    exec_program("msgfmt -o  ${INSTALL_DIR}/${GETTEXT_DOMAIN}.mo ${CMAKE_SOURCE_DIR}/scope/po/${POFILE}")
 
26
endforeach(POFILE)
 
27
 
 
28
INSTALL(
 
29
    DIRECTORY "built_mos/locale"
 
30
    DESTINATION "${SCOPE_INSTALLDIR}"
 
31
)
 
32