Skip to content

Commit 8665ea1

Browse files
committed
Improved input file and options handling in CMakeLists.txt.
1 parent 9a6d180 commit 8665ea1

File tree

3 files changed

+29
-22
lines changed

3 files changed

+29
-22
lines changed

po/CMakeLists.txt

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
# System-Tools
2-
# Copyright (C) 2013-2024 by Thomas Dreibholz
1+
# ==========================================================================
2+
# ____ _ _ _ _ ____ _
3+
# / ___| _ _| |__ | \ | | ___| |_ / ___|__ _| | ___
4+
# \___ \| | | | '_ \| \| |/ _ \ __| | / _` | |/ __|
5+
# ___) | |_| | |_) | |\ | __/ |_| |__| (_| | | (__
6+
# |____/ \__,_|_.__/|_| \_|\___|\__|\____\__,_|_|\___|
7+
#
8+
# --- IPv4/IPv6 Subnet Calculator ---
9+
# https://www.nntb.no/~dreibh/subnetcalc/
10+
# ==========================================================================
11+
#
12+
# SubNetCalc - IPv4/IPv6 Subnet Calculator
13+
# Copyright (C) 2024-2025 by Thomas Dreibholz
314
#
415
# This program is free software: you can redistribute it and/or modify
516
# it under the terms of the GNU General Public License as published by
@@ -14,15 +25,15 @@
1425
# You should have received a copy of the GNU General Public License
1526
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1627
#
17-
28+
1829

1930

2031
#############################################################################
2132
#### TRANSLATIONS ####
2233
#############################################################################
2334

24-
SET(copyrightHolder "Copyright (C) 2013-2024 by Thomas Dreibholz")
25-
SET(bugTrackerAddress "https://github.com/dreibh/system-tools/issues")
35+
SET(copyrightHolder "Copyright (C) 2013-2025 by Thomas Dreibholz")
36+
SET(bugTrackerAddress "https://github.com/dreibh/subnetcalc/issues")
2637

2738
FILE(GLOB sources "*.sources")
2839

@@ -37,16 +48,14 @@ FOREACH(source IN LISTS sources)
3748
# ====== Create POT file (translation template) ==========================
3849
FILE(READ "${source}" potInputFiles)
3950
STRING(REGEX REPLACE "[ \n]" ";" potInputFiles "${potInputFiles}")
51+
# The input (in potInputFiles) contains file names and options
52+
# (e.g. --language=C++). For the dependencies, just extract the list of
53+
# files without the options:
4054
SET(LIST potInputFilesForDependency "")
41-
SET(potInputFilesForGetText "")
4255
FOREACH(file ${potInputFiles})
4356
GET_FILENAME_COMPONENT(fileName ${file} NAME)
44-
IF (${fileName} MATCHES "^[-][-]")
45-
# Option -> Just add it for gettext
46-
SET(potInputFilesForGetText "${potInputFilesForGetText} F=${fileName}")
47-
ELSE()
57+
IF (NOT ${fileName} MATCHES "^[-][-]")
4858
# File -> Add absolute file name
49-
SET(potInputFilesForGetText "${potInputFilesForGetText} ${PROJECT_SOURCE_DIR}/${file}")
5059
LIST(APPEND potInputFilesForDependency ${potInputFilesAbsolute} "${PROJECT_SOURCE_DIR}/${file}")
5160
ENDIF()
5261
ENDFOREACH()
@@ -60,6 +69,7 @@ FOREACH(source IN LISTS sources)
6069
--package-version="${BUILD_VERSION}"
6170
--copyright-holder="${copyrightHolder}"
6271
--msgid-bugs-address="${bugTrackerAddress}"
72+
--no-wrap
6373
-p "${CMAKE_CURRENT_SOURCE_DIR}"
6474
-o "${potFile}"
6575
${potInputFiles}
@@ -86,6 +96,7 @@ FOREACH(source IN LISTS sources)
8696
ADD_CUSTOM_COMMAND(OUTPUT "${poStampFile}"
8797
COMMAND "${MSGMERGE}"
8898
--update "${poFile}" "${potFile}"
99+
--no-wrap
89100
COMMAND touch "${poStampFile}"
90101
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
91102
DEPENDS ${generate_PotFile} "${potFile}")

po/de/subnetcalc.po

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
msgid ""
88
msgstr ""
99
"Project-Id-Version: \"subnetcalc\" \"2.5.2~rc0\"\n"
10-
"Report-Msgid-Bugs-To: \"https://github.com/dreibh/system-tools/issues\"\n"
11-
"POT-Creation-Date: 2024-11-13 18:55+0000\n"
10+
"Report-Msgid-Bugs-To: \"https://github.com/dreibh/subnetcalc/issues\"\n"
11+
"POT-Creation-Date: 2025-04-26 12:38+0200\n"
1212
"PO-Revision-Date: 2024-10-19 18:40+0200\n"
1313
"Last-Translator: Thomas Dreibholz <[email protected]>\n"
1414
"Language-Team:\n"
@@ -21,11 +21,8 @@ msgstr ""
2121
"X-Source-Language: en_GB\n"
2222

2323
#: src/subnetcalc.cc:162
24-
msgid ""
25-
"ERROR: An IPv6 address must be given to generate a unique local address!"
26-
msgstr ""
27-
"FEHLER: Um eine eindeutige lokale Adresse zu generieren, muß eine IPv6-"
28-
"Adresse angegeben werden!"
24+
msgid "ERROR: An IPv6 address must be given to generate a unique local address!"
25+
msgstr "FEHLER: Um eine eindeutige lokale Adresse zu generieren, muß eine IPv6-Adresse angegeben werden!"
2926

3027
#: src/subnetcalc.cc:171
3128
#, c-format

po/nb/subnetcalc.po

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
msgid ""
88
msgstr ""
99
"Project-Id-Version: \"subnetcalc\" \"2.5.2~rc0\"\n"
10-
"Report-Msgid-Bugs-To: \"https://github.com/dreibh/system-tools/issues\"\n"
11-
"POT-Creation-Date: 2024-11-13 18:55+0000\n"
10+
"Report-Msgid-Bugs-To: \"https://github.com/dreibh/subnetcalc/issues\"\n"
11+
"POT-Creation-Date: 2025-04-26 12:38+0200\n"
1212
"PO-Revision-Date: 2024-10-19 18:40+0200\n"
1313
"Last-Translator: Thomas Dreibholz <[email protected]>\n"
1414
"Language-Team:\n"
@@ -21,8 +21,7 @@ msgstr ""
2121
"X-Source-Language: en_GB\n"
2222

2323
#: src/subnetcalc.cc:162
24-
msgid ""
25-
"ERROR: An IPv6 address must be given to generate a unique local address!"
24+
msgid "ERROR: An IPv6 address must be given to generate a unique local address!"
2625
msgstr "FEIL: En IPv6-adresse må oppgis for å generere en unik lokal adresse!"
2726

2827
#: src/subnetcalc.cc:171

0 commit comments

Comments
 (0)