From 33c9ffb5ca6f8757dd28eab236842becfa1f78b6 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 11 Jan 2017 03:08:58 +0000 Subject: [PATCH] Gettext: automatically update all translations. --- res/locales/uk_UA.po | 238 ++++++++++++++++++++++++++++++++++++++++++- src/CMakeLists.txt | 32 +++++- 2 files changed, 264 insertions(+), 6 deletions(-) diff --git a/res/locales/uk_UA.po b/res/locales/uk_UA.po index 81b10557..840eb59d 100644 --- a/res/locales/uk_UA.po +++ b/res/locales/uk_UA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SolveSpace 3.0\n" "Report-Msgid-Bugs-To: whitequark@whitequark.org\n" -"POT-Creation-Date: 2017-01-07 06:44+0000\n" +"POT-Creation-Date: 2017-01-11 03:01+0000\n" "PO-Revision-Date: 2017-01-05 10:30+0000\n" "Last-Translator: appsoft@ua.fm\n" "Language-Team: OpenOrienteeringUkraine\n" @@ -1247,6 +1247,182 @@ msgstr "" msgid "NEW COMMENT -- DOUBLE-CLICK TO EDIT" msgstr "" +#: platform/cocoamain.mm:481 platform/gtkmain.cpp:582 platform/w32main.cpp:448 +#: platform/w32main.cpp:1373 +msgctxt "title" +msgid "(new sketch)" +msgstr "" + +#: platform/cocoamain.mm:710 platform/gtkmain.cpp:896 platform/w32main.cpp:1292 +msgid "(no recent files)" +msgstr "" + +#: platform/cocoamain.mm:828 platform/gtkmain.cpp:1010 +msgid "untitled" +msgstr "" + +#: platform/cocoamain.mm:859 +msgid "Do you want to save the changes you made to the new sketch?" +msgstr "" + +#: platform/cocoamain.mm:861 +msgid "Your changes will be lost if you don't save them." +msgstr "" + +#: platform/cocoamain.mm:862 +msgctxt "button" +msgid "Save" +msgstr "" + +#: platform/cocoamain.mm:863 platform/cocoamain.mm:904 +msgctxt "button" +msgid "Cancel" +msgstr "" + +#: platform/cocoamain.mm:864 +msgctxt "button" +msgid "Don't Save" +msgstr "" + +#: platform/cocoamain.mm:879 +msgid "An autosave file is availible for this project." +msgstr "" + +#: platform/cocoamain.mm:881 +msgid "Do you want to load the autosave file instead?" +msgstr "" + +#: platform/cocoamain.mm:882 +msgctxt "button" +msgid "Load" +msgstr "" + +#: platform/cocoamain.mm:883 +msgctxt "button" +msgid "Don't Load" +msgstr "" + +#: platform/cocoamain.mm:899 +msgid "" +"Do you want to locate it manually?\n" +"If you select “No”, any geometry that depends on the missing file will be " +"removed." +msgstr "" + +#: platform/cocoamain.mm:902 +msgctxt "button" +msgid "Yes" +msgstr "" + +#: platform/cocoamain.mm:905 +msgctxt "button" +msgid "No" +msgstr "" + +#: platform/cocoamain.mm:1125 platform/w32main.cpp:180 +msgctxt "button" +msgid "OK" +msgstr "" + +#: platform/cocoamain.mm:1208 platform/gtkmain.cpp:1377 +#: platform/w32main.cpp:1395 platform/w32main.cpp:1435 +msgctxt "title" +msgid "Property Browser" +msgstr "" + +#: platform/gtkmain.cpp:952 +msgctxt "title" +msgid "Open File" +msgstr "" + +#: platform/gtkmain.cpp:954 +msgid "_Cancel" +msgstr "" + +#: platform/gtkmain.cpp:955 +msgid "_Open" +msgstr "" + +#: platform/gtkmain.cpp:1000 +msgctxt "title" +msgid "Save File" +msgstr "" + +#: platform/gtkmain.cpp:1003 platform/gtkmain.cpp:1040 +#: platform/gtkmain.cpp:1088 +msgctxt "button" +msgid "_Cancel" +msgstr "" + +#: platform/gtkmain.cpp:1004 platform/gtkmain.cpp:1038 +msgctxt "button" +msgid "_Save" +msgstr "" + +#: platform/gtkmain.cpp:1033 platform/w32main.cpp:1153 +msgid "" +"The file has changed since it was last saved.\n" +"\n" +"Do you want to save the changes?" +msgstr "" + +#: platform/gtkmain.cpp:1037 platform/w32main.cpp:1155 +msgctxt "title" +msgid "Modified File" +msgstr "" + +#: platform/gtkmain.cpp:1039 +msgctxt "button" +msgid "Do_n't Save" +msgstr "" + +#: platform/gtkmain.cpp:1057 platform/w32main.cpp:1179 +msgid "" +"An autosave file is availible for this project.\n" +"\n" +"Do you want to load the autosave file instead?" +msgstr "" + +#: platform/gtkmain.cpp:1061 platform/w32main.cpp:1181 +msgctxt "title" +msgid "Autosave Available" +msgstr "" + +#: platform/gtkmain.cpp:1062 +msgctxt "button" +msgid "_Load autosave" +msgstr "" + +#: platform/gtkmain.cpp:1063 +msgctxt "button" +msgid "Do_n't Load" +msgstr "" + +#: platform/gtkmain.cpp:1084 platform/w32main.cpp:1209 +msgctxt "title" +msgid "Missing File" +msgstr "" + +#: platform/gtkmain.cpp:1085 +msgctxt "button" +msgid "_Yes" +msgstr "" + +#: platform/gtkmain.cpp:1086 +msgctxt "button" +msgid "_No" +msgstr "" + +#: platform/gtkmain.cpp:1300 platform/w32main.cpp:176 +msgctxt "title" +msgid "Error" +msgstr "" + +#: platform/gtkmain.cpp:1300 platform/w32main.cpp:176 +msgctxt "title" +msgid "Message" +msgstr "" + #: style.cpp:161 msgid "" "Can't assign style to an entity that's derived from another entity; try " @@ -1405,6 +1581,66 @@ msgstr "Найближчий ізометричний вигляд" msgid "Align view to active workplane" msgstr "Вирівняти вигляд до активної робочої площини" +#: ui.h:69 +msgid "SolveSpace models" +msgstr "" + +#: ui.h:74 +msgid "PNG file" +msgstr "" + +#: ui.h:79 +msgid "STL mesh" +msgstr "" + +#: ui.h:80 +msgid "Wavefront OBJ mesh" +msgstr "" + +#: ui.h:81 +msgid "Three.js-compatible mesh, with viewer" +msgstr "" + +#: ui.h:82 +msgid "Three.js-compatible mesh, mesh only" +msgstr "" + +#: ui.h:87 ui.h:95 ui.h:103 +msgid "STEP file" +msgstr "" + +#: ui.h:92 +msgid "PDF file" +msgstr "" + +#: ui.h:93 +msgid "Encapsulated PostScript" +msgstr "" + +#: ui.h:94 +msgid "Scalable Vector Graphics" +msgstr "" + +#: ui.h:96 ui.h:104 +msgid "DXF file (AutoCAD 2007)" +msgstr "" + +#: ui.h:97 +msgid "HPGL file" +msgstr "" + +#: ui.h:98 +msgid "G Code" +msgstr "" + +#: ui.h:109 +msgid "AutoCAD DXF and DWG files" +msgstr "" + +#: ui.h:114 +msgid "Comma-separated values" +msgstr "" + #: view.cpp:78 msgid "Scale cannot be zero or negative." msgstr "" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d8f2b0b4..1d4d3ddc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -213,13 +213,15 @@ target_compile_options(solvespace-core # solvespace translations if(HAVE_GETTEXT) - set(output_pot ${CMAKE_CURRENT_SOURCE_DIR}/../res/messages.pot) - set(templ_po ${CMAKE_CURRENT_BINARY_DIR}/messages.po) - set(output_po ${CMAKE_CURRENT_SOURCE_DIR}/../res/locales/en_US.po) set(inputs ${solvespace_core_SOURCES} ${solvespace_core_HEADERS} ${every_platform_SOURCES}) + set(output_pot ${CMAKE_CURRENT_SOURCE_DIR}/../res/messages.pot) + set(templ_po ${CMAKE_CURRENT_BINARY_DIR}/messages.po) + set(output_po ${CMAKE_CURRENT_SOURCE_DIR}/../res/locales/en_US.po) + + file(GLOB locale_pos ${CMAKE_CURRENT_SOURCE_DIR}/../res/locales/*.po) add_custom_command( OUTPUT ${output_pot} @@ -236,6 +238,9 @@ if(HAVE_GETTEXT) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Extracting translations" VERBATIM) + + # en_US is a bit special; we pre-fill the msgstrs from msgids, instead of (as would normally + # happen) leaving them empty. add_custom_command( OUTPUT ${output_po} COMMAND ${MSGINIT} @@ -245,10 +250,27 @@ if(HAVE_GETTEXT) --force-po --no-fuzzy-matching --output=${output_po} ${output_po} ${templ_po} DEPENDS ${output_pot} - COMMENT "Updating English translations" + COMMENT "Updating en_US translations" VERBATIM) + + foreach(locale_po ${locale_pos}) + get_filename_component(locale_name ${locale_po} NAME_WE) + if(locale_name STREQUAL "en_US") + continue() + endif() + + add_custom_command( + OUTPUT ${locale_po} + COMMAND ${MSGMERGE} + --update --no-fuzzy-matching + ${locale_po} ${output_pot} + DEPENDS ${output_pot} + COMMENT "Updating ${locale_name} translations" + VERBATIM) + endforeach() + add_custom_target(solvespace-translations - DEPENDS ${output_pot} ${output_po}) + DEPENDS ${output_pot} ${output_po} ${locale_pos}) endif() # solvespace graphical executable