This repository has been archived by the owner on Aug 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add localization support and apply German translation
- Loading branch information
Showing
5 changed files
with
165 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,9 @@ cp "$src/schemas/gschemas.compiled" \ | |
"$src/schemas/[email protected]" \ | ||
"$path/[email protected]/schemas" \ | ||
|| die "Cannot copy files to '$path/[email protected]/schemas'" | ||
cp -r "$src/locale" \ | ||
"$path/[email protected]/locale" \ | ||
|| die "Cannot copy files to '$path/[email protected]/locale'" | ||
|
||
# Done! | ||
echo 'Installation finished!' |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
# This file is distributed under the same license as the adnts package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: adnts\n" | ||
"Report-Msgid-Bugs-To: Naqua Darazaki <[email protected]>\n" | ||
"POT-Creation-Date: 2020-05-25 15:28+0200\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"Language: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
|
||
#: prefs.js:173 | ||
msgid "Day/Night GTK Themes" | ||
msgstr "" | ||
|
||
#: prefs.js:185 prefs.js:308 | ||
msgid "Day Theme" | ||
msgstr "" | ||
|
||
#: prefs.js:208 prefs.js:331 | ||
msgid "Night Theme" | ||
msgstr "" | ||
|
||
#: prefs.js:239 | ||
msgid "Nighttime (24h format)" | ||
msgstr "" | ||
|
||
#: prefs.js:251 | ||
msgid "Start of Nighttime" | ||
msgstr "" | ||
|
||
#: prefs.js:265 | ||
msgid "End of Nighttime" | ||
msgstr "" | ||
|
||
#: prefs.js:289 | ||
msgid "Day/Night Shell Themes" | ||
msgstr "" | ||
|
||
#: prefs.js:369 | ||
msgid "Day/Night Commands (executed with /bin/sh)" | ||
msgstr "" | ||
|
||
#: prefs.js:394 | ||
msgid "Day Command" | ||
msgstr "" | ||
|
||
#: prefs.js:417 | ||
msgid "Night Command" | ||
msgstr "" | ||
|
||
#: prefs.js:448 | ||
msgid "Advanced" | ||
msgstr "" | ||
|
||
#: prefs.js:460 | ||
msgid "Time Check Period (in ms)" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# German translations for adnts package. | ||
# Copyright (C) 2020 THE adnts'S COPYRIGHT HOLDER | ||
# This file is distributed under the same license as the adnts package. | ||
# Onno Giesmann <[email protected]>, 2020. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: adnts\n" | ||
"Report-Msgid-Bugs-To: Naqua Darazaki <[email protected]>\n" | ||
"POT-Creation-Date: 2020-05-25 15:28+0200\n" | ||
"PO-Revision-Date: 2020-05-25 15:28+0200\n" | ||
"Last-Translator: Onno Giesmann <[email protected]>\n" | ||
"Language-Team: German\n" | ||
"Language: de_DE\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
#: prefs.js:173 | ||
msgid "Day/Night GTK Themes" | ||
msgstr "GTK-Themen für Tag/Nacht" | ||
|
||
#: prefs.js:185 prefs.js:308 | ||
msgid "Day Theme" | ||
msgstr "Tag-Thema" | ||
|
||
#: prefs.js:208 prefs.js:331 | ||
msgid "Night Theme" | ||
msgstr "Nacht-Thema" | ||
|
||
#: prefs.js:239 | ||
msgid "Nighttime (24h format)" | ||
msgstr "Nachtzeit (24h-Format)" | ||
|
||
#: prefs.js:251 | ||
msgid "Start of Nighttime" | ||
msgstr "Beginn der Nacht" | ||
|
||
#: prefs.js:265 | ||
msgid "End of Nighttime" | ||
msgstr "Ende der Nacht" | ||
|
||
#: prefs.js:289 | ||
msgid "Day/Night Shell Themes" | ||
msgstr "Shell-Themen für Tag/Nacht" | ||
|
||
#: prefs.js:369 | ||
msgid "Day/Night Commands (executed with /bin/sh)" | ||
msgstr "Befehle für Tag/Nacht (ausgeführt mit /bin/sh)" | ||
|
||
#: prefs.js:394 | ||
msgid "Day Command" | ||
msgstr "Befehl für Tag" | ||
|
||
#: prefs.js:417 | ||
msgid "Night Command" | ||
msgstr "Befehl für Nacht" | ||
|
||
#: prefs.js:448 | ||
msgid "Advanced" | ||
msgstr "Erweitert" | ||
|
||
#: prefs.js:460 | ||
msgid "Time Check Period (in ms)" | ||
msgstr "Intervall Zeitprüfung (in ms)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,16 @@ const { Gio, Gtk } = imports.gi; | |
const ExtensionUtils = imports.misc.extensionUtils; | ||
const Me = ExtensionUtils.getCurrentExtension(); | ||
const Config = imports.misc.config; | ||
const Gettext = imports.gettext; | ||
|
||
|
||
// Init translations | ||
Gettext.textdomain('[email protected]'); | ||
Gettext.bindtextdomain( | ||
'[email protected]', | ||
Me.dir.get_child('locale').get_path(), | ||
); | ||
const _ = Gettext.gettext; | ||
|
||
|
||
// `extensionManager` may not be available in the current version of GNOME Shell | ||
|
@@ -160,7 +170,7 @@ function buildPrefsWidget() { | |
// THEMES HEADER | ||
|
||
let titleThemes = new Gtk.Label({ | ||
label: '<b>Day/Night GTK Themes</b>', | ||
label: '<b>' + _('Day/Night GTK Themes') + '</b>', | ||
halign: Gtk.Align.START, | ||
use_markup: true, | ||
visible: true, | ||
|
@@ -172,7 +182,7 @@ function buildPrefsWidget() { | |
// THEME DAY | ||
|
||
let labelThemeDay = new Gtk.Label({ | ||
label: 'Day Theme', | ||
label: _('Day Theme'), | ||
visible: true, | ||
}); | ||
prefWidget.attach(labelThemeDay, 0, line, 1, 1); | ||
|
@@ -195,7 +205,7 @@ function buildPrefsWidget() { | |
// THEME NIGHT | ||
|
||
let labelThemeNight = new Gtk.Label({ | ||
label: 'Night Theme', | ||
label: _('Night Theme'), | ||
visible: true, | ||
}); | ||
prefWidget.attach(labelThemeNight, 0, line, 1, 1); | ||
|
@@ -226,7 +236,7 @@ function buildPrefsWidget() { | |
// NIGHTTIME HEADER | ||
|
||
let titleNighttime = new Gtk.Label({ | ||
label: '<b>Nighttime (24h format)</b>', | ||
label: '<b>' + _('Nighttime (24h format)') + '</b>', | ||
halign: Gtk.Align.START, | ||
use_markup: true, | ||
visible: true, | ||
|
@@ -238,7 +248,10 @@ function buildPrefsWidget() { | |
// NIGHTTIME BEGIN | ||
|
||
let nighttimeRowBegin = buildNighttimeRow( | ||
'Start of Nighttime', 'nighttime-begin', settings); | ||
_('Start of Nighttime'), | ||
'nighttime-begin', | ||
settings, | ||
); | ||
let nighttimeRowBeginLength = nighttimeRowBegin.length; | ||
for (let i = 0; i < nighttimeRowBeginLength; ++i) { | ||
prefWidget.attach(nighttimeRowBegin[i], i, line, 1, 1); | ||
|
@@ -249,7 +262,10 @@ function buildPrefsWidget() { | |
// NIGHTTIME END | ||
|
||
let nighttimeRowEnd = buildNighttimeRow( | ||
'End of Nighttime', 'nighttime-end', settings); | ||
_('End of Nighttime'), | ||
'nighttime-end', | ||
settings, | ||
); | ||
let nighttimeRowEndLength = nighttimeRowEnd.length; | ||
for (let i = 0; i < nighttimeRowEndLength; ++i) { | ||
prefWidget.attach(nighttimeRowEnd[i], i, line, 1, 1); | ||
|
@@ -270,7 +286,7 @@ function buildPrefsWidget() { | |
// SHELL THEMES HEADER | ||
|
||
let titleShellThemes = new Gtk.Label({ | ||
label: '<b>Day/Night Shell Themes</b>', | ||
label: '<b>' + _('Day/Night Shell Themes') + '</b>', | ||
halign: Gtk.Align.START, | ||
use_markup: true, | ||
visible: true, | ||
|
@@ -295,7 +311,7 @@ function buildPrefsWidget() { | |
// SHELL THEME DAY | ||
|
||
let labelShellThemeDay = new Gtk.Label({ | ||
label: 'Day Theme', | ||
label: _('Day Theme'), | ||
visible: true, | ||
}); | ||
prefWidget.attach(labelShellThemeDay, 0, line, 1, 1); | ||
|
@@ -318,7 +334,7 @@ function buildPrefsWidget() { | |
// SHELL THEME NIGHT | ||
|
||
let labelShellThemeNight = new Gtk.Label({ | ||
label: 'Night Theme', | ||
label: _('Night Theme'), | ||
visible: true, | ||
}); | ||
prefWidget.attach(labelShellThemeNight, 0, line, 1, 1); | ||
|
@@ -350,7 +366,7 @@ function buildPrefsWidget() { | |
// COMMANDS HEADER | ||
|
||
let titleCommands = new Gtk.Label({ | ||
label: '<b>Day/Night Commands (executed with /bin/sh)</b>', | ||
label: '<b>' + _('Day/Night Commands (executed with /bin/sh)') + '</b>', | ||
halign: Gtk.Align.START, | ||
use_markup: true, | ||
visible: true, | ||
|
@@ -375,7 +391,7 @@ function buildPrefsWidget() { | |
// COMMAND DAY | ||
|
||
let labelCommandDay = new Gtk.Label({ | ||
label: 'Day Command', | ||
label: _('Day Command'), | ||
visible: true, | ||
}); | ||
prefWidget.attach(labelCommandDay, 0, line, 1, 1); | ||
|
@@ -398,7 +414,7 @@ function buildPrefsWidget() { | |
// COMMAND NIGHT | ||
|
||
let labelCommandNight = new Gtk.Label({ | ||
label: 'Night Command', | ||
label: _('Night Command'), | ||
visible: true, | ||
}); | ||
prefWidget.attach(labelCommandNight, 0, line, 1, 1); | ||
|
@@ -429,7 +445,7 @@ function buildPrefsWidget() { | |
// ADVANCED HEADER | ||
|
||
let titleAdvanced = new Gtk.Label({ | ||
label: '<b>Advanced</b>', | ||
label: '<b>' + _('Advanced') + '</b>', | ||
halign: Gtk.Align.START, | ||
use_markup: true, | ||
visible: true, | ||
|
@@ -441,7 +457,7 @@ function buildPrefsWidget() { | |
// TIME CHECK PERIOD | ||
|
||
let labelCheckPeriod = new Gtk.Label({ | ||
label: 'Time Check Period (in ms)', | ||
label: _('Time Check Period (in ms)'), | ||
visible: true, | ||
}); | ||
prefWidget.attach(labelCheckPeriod, 0, line, 1, 1); | ||
|