mail[Wesnoth-commits] r34362 - /trunk/po/CMakeLists.txt


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on March 31, 2009 - 23:34:
Author: mordante
Date: Tue Mar 31 23:34:49 2009
New Revision: 34362

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34362&view=rev
Log:
Create the mo files out of tree.

With this change it's possible to use the translations without
installing and using dummy-locales. The next step is to convert the
dummy locales to use these translations and removing the old gmo
targets.

Modified:
    trunk/po/CMakeLists.txt

Modified: trunk/po/CMakeLists.txt
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/po/CMakeLists.txt?rev=34362&r1=34361&r2=34362&view=diff
==============================================================================
--- trunk/po/CMakeLists.txt (original)
+++ trunk/po/CMakeLists.txt Tue Mar 31 23:34:49 2009
@@ -305,3 +305,47 @@
 
 endif(ENABLE_POT_UPDATE_TARGET)
 
+if(ENABLE_NLS)
+
+       foreach(DOMAIN ${DOMAINS})
+
+               foreach(LANG ${LANGUAGES})
+
+                       add_custom_command(
+                               OUTPUT 
${CMAKE_SOURCE_DIR}/${LOCALEDIR}/${LANG}/LC_MESSAGES
+                               COMMAND ${CMAKE_COMMAND} -E make_directory 
+                                               
${CMAKE_SOURCE_DIR}/${LOCALEDIR}/${LANG}/LC_MESSAGES
+                               COMMENT "mo-update [${LANG}]: Creating locale 
directory."
+                       )
+
+                       add_custom_command(
+                               OUTPUT 
${CMAKE_SOURCE_DIR}/${LOCALEDIR}/${LANG}/LC_MESSAGES/${DOMAIN}.mo
+                               COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} 
+                                               -o 
${CMAKE_SOURCE_DIR}/${LOCALEDIR}/${LANG}/LC_MESSAGES/${DOMAIN}.mo ${LANG}.po
+                               DEPENDS 
+                                       
${CMAKE_SOURCE_DIR}/${LOCALEDIR}/${LANG}/LC_MESSAGES
+                                       
${PROJECT_SOURCE_DIR}/po/${DOMAIN}/${LANG}.po
+                               WORKING_DIRECTORY 
${PROJECT_SOURCE_DIR}/po/${DOMAIN}
+                               COMMENT "mo-update [${DOMAIN}-${LANG}]: 
Creating mo file."
+                       )
+
+                       set(mo-update-SRC ${mo-update-SRC} 
+                               
${CMAKE_SOURCE_DIR}/${LOCALEDIR}/${LANG}/LC_MESSAGES/${DOMAIN}.mo
+                       )
+
+               endforeach(LANG ${LANGUAGES})
+
+       endforeach(DOMAIN ${DOMAINS})
+
+       # The target to call
+       add_custom_target(mo-update2 ALL
+               COMMENT "mo-update: Done."
+               DEPENDS ${mo-update-SRC}
+       )
+
+       set_directory_properties(properties 
+               ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_SOURCE_DIR}/${LOCALEDIR}
+       )
+
+endif(ENABLE_NLS)
+




Related Messages


Powered by MHonArc, Updated Tue Mar 31 23:40:36 2009