[evolution-data-server/wip/damned-lies] po: Merge .source files back to the POTFILES.in
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/damned-lies] po: Merge .source files back to the POTFILES.in
- Date: Mon, 26 Sep 2022 06:12:29 +0000 (UTC)
commit 4d84d440b9062bfc255186e39cca1f104c85e9b6
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 19 09:24:10 2022 +0200
po: Merge .source files back to the POTFILES.in
Let the .source files be named as .desktop.in in the sources, thus
they are understood to the gettext for the text extraction. It also
helps to the Damned Lies
(https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/78#note_1402321).
po/CMakeLists.txt | 16 +++-------------
po/Makevars | 2 ++
po/POTFILES.in | 20 ++++++++++++++++++++
po/POTFILES.source.in | 18 ------------------
po/configure.ac | 2 ++
.../evolution-source-registry/CMakeLists.txt | 2 +-
...rthdays.source.in => birthdays.source.desktop.in} | 0
...-stub.source.in => caldav-stub.source.desktop.in} | 0
...stub.source.in => carddav-stub.source.desktop.in} | 0
...tub.source.in => contacts-stub.source.desktop.in} | 0
...-stub.source.in => google-stub.source.desktop.in} | 0
...ap-stub.source.in => ldap-stub.source.desktop.in} | 0
...l-stub.source.in => local-stub.source.desktop.in} | 0
.../{local.source.in => local.source.desktop.in} | 0
...sendmail.source.in => sendmail.source.desktop.in} | 0
...urce.in => system-address-book.source.desktop.in} | 0
...r.source.in => system-calendar.source.desktop.in} | 0
....source.in => system-memo-list.source.desktop.in} | 0
...roxy.source.in => system-proxy.source.desktop.in} | 0
....source.in => system-task-list.source.desktop.in} | 0
.../{vfolder.source.in => vfolder.source.desktop.in} | 0
...stub.source.in => weather-stub.source.desktop.in} | 0
...-stub.source.in => webcal-stub.source.desktop.in} | 0
...source.in => webdav-notes-stub.source.desktop.in} | 0
24 files changed, 28 insertions(+), 32 deletions(-)
---
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 2174db60f..c85de3491 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -3,10 +3,9 @@ find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
set(DOMAIN ${FULL_PROJECT_NAME})
set(POT_FILE ${GETTEXT_PACKAGE}.pot)
-file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in TRANSLATED_FILES_1 ENCODING UTF-8 REGEX "^[^#].*")
-file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.source.in TRANSLATED_FILES_2 ENCODING UTF-8 REGEX
"^[^#].*")
+file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in TRANSLATED_FILES_IN ENCODING UTF-8 REGEX "^[^#].*")
set(TRANSLATED_FILES)
-foreach(TRANSLATED_FILE ${TRANSLATED_FILES_1} ${TRANSLATED_FILES_2})
+foreach(TRANSLATED_FILE ${TRANSLATED_FILES_IN})
list(APPEND TRANSLATED_FILES "../${TRANSLATED_FILE}")
endforeach(TRANSLATED_FILE)
@@ -26,6 +25,7 @@ add_custom_command(
--keyword=g_dcgettext:2
--keyword=g_dngettext:2,3
--keyword=g_dpgettext2:2c,3
+ --keyword=DisplayName
--flag=N_:1:pass-c-format
--flag=C_:2:pass-c-format
--flag=NC_:2:pass-c-format
@@ -43,16 +43,6 @@ add_custom_command(
--flag=g_fprintf:2:c-format
--flag=g_sprintf:2:c-format
--flag=g_snprintf:3:c-format
-# .source files are not standard so handle them the best we can
- COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} -o ${POT_FILE}
- --directory=${CMAKE_SOURCE_DIR}
- --package-name=${GETTEXT_PACKAGE}
- --language=Desktop
- --join-existing
- --files-from=${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.source.in
- --from-code=UTF-8
- --add-comments
- --keyword=DisplayName
OUTPUT ${POT_FILE}
DEPENDS ${TRANSLATED_FILES}
)
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 000000000..316dc257c
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,2 @@
+top_builddir=.
+XGETTEXT_OPTIONS="--keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dcgettext:2
--keyword=g_dngettext:2,3 --keyword=g_dpgettext2:2c,3 --keyword=DisplayName --flag=N_:1:pass-c-format
--flag=C_:2:pass-c-format --flag=NC_:2:pass-c-format --flag=g_dngettext:2:pass-c-format
--flag=g_strdup_printf:1:c-format --flag=g_string_printf:2:c-format --flag=g_string_append_printf:2:c-format
--flag=g_error_new:3:c-format --flag=g_set_error:4:c-format --flag=g_markup_printf_escaped:1:c-format
--flag=g_log:3:c-format --flag=g_print:1:c-format --flag=g_printerr:1:c-format --flag=g_printf:1:c-format
--flag=g_fprintf:2:c-format --flag=g_sprintf:2:c-format --flag=g_snprintf:3:c-format"
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 295c153dc..7d52fe5fa 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -232,3 +232,23 @@ src/services/evolution-user-prompter/evolution-user-prompter.c
src/services/evolution-user-prompter/prompt-user-gtk.c
src/tools/addressbook-export/addressbook-export.c
src/tools/list-sources/list-sources.c
+
+# special-case .source files, pretending they are .desktop, to be understood by the gettext
+src/services/evolution-source-registry/builtin/birthdays.source.desktop.in
+src/services/evolution-source-registry/builtin/caldav-stub.source.desktop.in
+src/services/evolution-source-registry/builtin/carddav-stub.source.desktop.in
+src/services/evolution-source-registry/builtin/contacts-stub.source.desktop.in
+src/services/evolution-source-registry/builtin/google-stub.source.desktop.in
+src/services/evolution-source-registry/builtin/ldap-stub.source.desktop.in
+src/services/evolution-source-registry/builtin/local.source.desktop.in
+src/services/evolution-source-registry/builtin/local-stub.source.desktop.in
+src/services/evolution-source-registry/builtin/sendmail.source.desktop.in
+src/services/evolution-source-registry/builtin/system-address-book.source.desktop.in
+src/services/evolution-source-registry/builtin/system-calendar.source.desktop.in
+src/services/evolution-source-registry/builtin/system-memo-list.source.desktop.in
+src/services/evolution-source-registry/builtin/system-proxy.source.desktop.in
+src/services/evolution-source-registry/builtin/system-task-list.source.desktop.in
+src/services/evolution-source-registry/builtin/vfolder.source.desktop.in
+src/services/evolution-source-registry/builtin/weather-stub.source.desktop.in
+src/services/evolution-source-registry/builtin/webcal-stub.source.desktop.in
+src/services/evolution-source-registry/builtin/webdav-notes-stub.source.desktop.in
diff --git a/po/configure.ac b/po/configure.ac
new file mode 100644
index 000000000..80064674f
--- /dev/null
+++ b/po/configure.ac
@@ -0,0 +1,2 @@
+dnl This is only for the Damned Lies
+
diff --git a/src/services/evolution-source-registry/CMakeLists.txt
b/src/services/evolution-source-registry/CMakeLists.txt
index d463c9940..aa0f9b391 100644
--- a/src/services/evolution-source-registry/CMakeLists.txt
+++ b/src/services/evolution-source-registry/CMakeLists.txt
@@ -49,7 +49,7 @@ endif(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/builtin)
set(builtin_sources)
foreach(_file ${builtin_sources_files})
i18n_merge_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/builtin/${_file}.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/builtin/${_file}.desktop.in
${CMAKE_CURRENT_BINARY_DIR}/builtin/${_file}
${CMAKE_SOURCE_DIR}/po
EXTRA_ARGS "--keyword=DisplayName"
diff --git a/src/services/evolution-source-registry/builtin/birthdays.source.in
b/src/services/evolution-source-registry/builtin/birthdays.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/birthdays.source.in
rename to src/services/evolution-source-registry/builtin/birthdays.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/caldav-stub.source.in
b/src/services/evolution-source-registry/builtin/caldav-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/caldav-stub.source.in
rename to src/services/evolution-source-registry/builtin/caldav-stub.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/carddav-stub.source.in
b/src/services/evolution-source-registry/builtin/carddav-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/carddav-stub.source.in
rename to src/services/evolution-source-registry/builtin/carddav-stub.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/contacts-stub.source.in
b/src/services/evolution-source-registry/builtin/contacts-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/contacts-stub.source.in
rename to src/services/evolution-source-registry/builtin/contacts-stub.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/google-stub.source.in
b/src/services/evolution-source-registry/builtin/google-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/google-stub.source.in
rename to src/services/evolution-source-registry/builtin/google-stub.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/ldap-stub.source.in
b/src/services/evolution-source-registry/builtin/ldap-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/ldap-stub.source.in
rename to src/services/evolution-source-registry/builtin/ldap-stub.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/local-stub.source.in
b/src/services/evolution-source-registry/builtin/local-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/local-stub.source.in
rename to src/services/evolution-source-registry/builtin/local-stub.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/local.source.in
b/src/services/evolution-source-registry/builtin/local.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/local.source.in
rename to src/services/evolution-source-registry/builtin/local.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/sendmail.source.in
b/src/services/evolution-source-registry/builtin/sendmail.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/sendmail.source.in
rename to src/services/evolution-source-registry/builtin/sendmail.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/system-address-book.source.in
b/src/services/evolution-source-registry/builtin/system-address-book.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/system-address-book.source.in
rename to src/services/evolution-source-registry/builtin/system-address-book.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/system-calendar.source.in
b/src/services/evolution-source-registry/builtin/system-calendar.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/system-calendar.source.in
rename to src/services/evolution-source-registry/builtin/system-calendar.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/system-memo-list.source.in
b/src/services/evolution-source-registry/builtin/system-memo-list.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/system-memo-list.source.in
rename to src/services/evolution-source-registry/builtin/system-memo-list.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/system-proxy.source.in
b/src/services/evolution-source-registry/builtin/system-proxy.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/system-proxy.source.in
rename to src/services/evolution-source-registry/builtin/system-proxy.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/system-task-list.source.in
b/src/services/evolution-source-registry/builtin/system-task-list.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/system-task-list.source.in
rename to src/services/evolution-source-registry/builtin/system-task-list.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/vfolder.source.in
b/src/services/evolution-source-registry/builtin/vfolder.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/vfolder.source.in
rename to src/services/evolution-source-registry/builtin/vfolder.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/weather-stub.source.in
b/src/services/evolution-source-registry/builtin/weather-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/weather-stub.source.in
rename to src/services/evolution-source-registry/builtin/weather-stub.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/webcal-stub.source.in
b/src/services/evolution-source-registry/builtin/webcal-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/webcal-stub.source.in
rename to src/services/evolution-source-registry/builtin/webcal-stub.source.desktop.in
diff --git a/src/services/evolution-source-registry/builtin/webdav-notes-stub.source.in
b/src/services/evolution-source-registry/builtin/webdav-notes-stub.source.desktop.in
similarity index 100%
rename from src/services/evolution-source-registry/builtin/webdav-notes-stub.source.in
rename to src/services/evolution-source-registry/builtin/webdav-notes-stub.source.desktop.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]