Skip to content

Commit a4bd0fb

Browse files
committed
Add partial NMBS-i18n Target
1 parent f24aa7f commit a4bd0fb

7 files changed

Lines changed: 75 additions & 59 deletions

File tree

.idea/runConfigurations/NMBS_Nautilus.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ dh clean
6767
Finally, this is a CLion project. The project settings include a "dpkg" target, and just using the GUI will work for
6868
the CMake Targets.
6969

70+
# Localising
71+
72+
```bash
73+
msginit --locale=de.UTF-8 --input=targets/NMBS-i18n/nmbs.pot --output=targets/NMBS-i18n/po/de.po
74+
```
75+
7076
# Standards
7177

7278
- ADatP-4774 (Ed.A V.1 12.2017) CONFIDENTIALITY METADATA LABEL SYNTAX

targets/NMBS-Nautilus/src/nmbs-nautilus.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static GList* nmbs_properties_get_columns(NautilusColumnProvider*)
122122
NautilusColumn* column = nautilus_column_new(
123123
"NmbsProperties::classification",
124124
nmbs_column_classification_key,
125-
gettext("classification"),
125+
gettext("Classification"),
126126
"Displays ADatP-4774 classification metadata"
127127
);
128128

@@ -373,8 +373,6 @@ static void nmbs_properties_model_provider_iface_init(NautilusPropertiesModelPro
373373
void nautilus_module_initialize(GTypeModule* module)
374374
{
375375
g_log("NMBS", G_LOG_LEVEL_DEBUG, "nautilus_module_initialize");
376-
g_log("NMBS", G_LOG_LEVEL_DEBUG, "LC_ALL: %s", getenv("LC_ALL"));
377-
g_log("NMBS", G_LOG_LEVEL_DEBUG, "LC_MESSAGES: %s", getenv("LC_MESSAGES"));
378376
g_log("NMBS", G_LOG_LEVEL_DEBUG, "LANG: %s", getenv("LANG"));
379377
g_log("NMBS", G_LOG_LEVEL_DEBUG, "NMBS_LOCPATH: %s", getenv("NMBS_LOCPATH"));
380378

@@ -383,15 +381,12 @@ void nautilus_module_initialize(GTypeModule* module)
383381
g_log("NMBS", G_LOG_LEVEL_DEBUG, "setlocale: %s", setlocale(LC_ALL, ""));
384382
g_log("NMBS", G_LOG_LEVEL_DEBUG, "bindtextdomain: %s", bindtextdomain("nmbs", getenv("NMBS_LOCPATH")));
385383
g_log("NMBS", G_LOG_LEVEL_DEBUG, "textdomain: %s", textdomain("nmbs"));
386-
387-
g_log("NMBS", G_LOG_LEVEL_DEBUG, "TEST: %s", gettext("test"));
388-
g_log("NMBS", G_LOG_LEVEL_DEBUG, "TEST: %s", gettext("test2"));
389384
}
390385

391386
void nautilus_module_shutdown(void)
392387
{
393388
g_log("NMBS", G_LOG_LEVEL_DEBUG, "nautilus_module_shutdown");
394-
// Free memory if necessary
389+
nmbs_cleanup();
395390
}
396391

397392
void nautilus_module_list_types(const GType** types, int* num_types)

targets/NMBS-i18n/nmbs.pot

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# nmbs.pot
2-
#
31
# Copyright (c) 2026 Luke Ian Turner
42
#
53
# Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -33,13 +31,5 @@ msgstr ""
3331
"Content-Transfer-Encoding: 8bit\n"
3432

3533
#: targets/NMBS-Nautilus/src/nmbs-nautilus.c:125
36-
msgid "classification"
37-
msgstr ""
38-
39-
#: targets/NMBS-Nautilus/src/nmbs-nautilus.c:387
40-
msgid "test"
41-
msgstr ""
42-
43-
#: targets/NMBS-Nautilus/src/nmbs-nautilus.c:388
44-
msgid "test2"
34+
msgid "Classification"
4535
msgstr ""

targets/NMBS-i18n/po/de.po

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
1+
# Copyright (c) 2026 Luke Ian Turner
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
120
msgid ""
221
msgstr ""
22+
"Project-Id-Version: nmbs 1.0.0\n"
323
"Report-Msgid-Bugs-To: turnertech@outlook.de\n"
424
"POT-Creation-Date: 2026-07-19 11:13+0200\n"
25+
"PO-Revision-Date: 2026-07-19 16:58+0200\n"
26+
"Last-Translator: Luke Ian Turner <turnertech@outlook.de>\n"
27+
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
28+
"Language: de\n"
29+
"MIME-Version: 1.0\n"
530
"Content-Type: text/plain; charset=UTF-8\n"
31+
"Content-Transfer-Encoding: 8bit\n"
32+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
633

734
#: targets/NMBS-Nautilus/src/nmbs-nautilus.c:125
8-
msgid "classification"
35+
msgid "Classification"
936
msgstr "Einstufung"
10-
11-
#: targets/NMBS-Nautilus/src/nmbs-nautilus.c:387
12-
msgid "test"
13-
msgstr ""
14-
15-
#: targets/NMBS-Nautilus/src/nmbs-nautilus.c:388
16-
msgid "test2"
17-
msgstr ""
18-
19-
#~ msgid "rick"
20-
#~ msgstr "Rick"
21-
22-
#~ msgid "Morty"
23-
#~ msgstr "Wins"

targets/NMBS-i18n/po/en_GB.po

Lines changed: 0 additions & 25 deletions
This file was deleted.

targets/NMBS-i18n/po/fr.po

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2026 Luke Ian Turner
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
msgid ""
21+
msgstr ""
22+
"Project-Id-Version: nmbs 1.0.0\n"
23+
"Report-Msgid-Bugs-To: turnertech@outlook.de\n"
24+
"POT-Creation-Date: 2026-07-19 11:13+0200\n"
25+
"PO-Revision-Date: 2026-07-19 17:13+0200\n"
26+
"Last-Translator: Luke Ian Turner <turnertech@outlook.de>\n"
27+
"Language-Team: French <traduc@traduc.org>\n"
28+
"Language: fr\n"
29+
"MIME-Version: 1.0\n"
30+
"Content-Type: text/plain; charset=UTF-8\n"
31+
"Content-Transfer-Encoding: 8bit\n"
32+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
33+
34+
#: targets/NMBS-Nautilus/src/nmbs-nautilus.c:125
35+
msgid "Classification"
36+
msgstr ""

0 commit comments

Comments
 (0)