-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added gettext support for pam module
Signed-off-by: Tero Saarni <[email protected]>
- Loading branch information
Showing
13 changed files
with
420 additions
and
18 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 |
---|---|---|
|
@@ -83,3 +83,6 @@ stamp-* | |
|
||
# /utils/ | ||
/utils/constants.py | ||
|
||
# /po/ | ||
/po/*.gmo |
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
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 |
---|---|---|
|
@@ -30,3 +30,5 @@ libdict_a_SOURCES = dict.c dict.h \ | |
set.c set.h | ||
|
||
libexpr_a_SOURCES = expr.c expr.h | ||
|
||
noinst_HEADERS = gettext.h |
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,38 @@ | ||
/* | ||
This file is part of the nss-pam-ldapd library. | ||
Copyright (C) 2024 Tero Saarni | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 2.1 of the License, or (at your option) any later version. | ||
This library is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public | ||
License along with this library; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
02110-1301 USA | ||
*/ | ||
|
||
#ifndef COMMON__GETTEXT_H | ||
#define COMMON__GETTEXT_H 1 | ||
|
||
#if defined ENABLE_NLS && ENABLE_NLS | ||
|
||
#include <libintl.h> | ||
#define _(msgid) dgettext(PACKAGE, msgid) | ||
|
||
#else | ||
|
||
#define _(msgid) (msgid) | ||
#define bindtextdomain(domainname, dirname) \ | ||
((void)(domainname), (const char *)(dirname)) | ||
|
||
#endif | ||
|
||
#endif /* COMMON__GETTEXT_H */ |
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
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
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
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
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
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,75 @@ | ||
# Makefile.am - use automake to generate Makefile.in | ||
# | ||
# Copyright (C) 2024 Tero Saarni. | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 2.1 of the License, or (at your option) any later version. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this library; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
# 02110-1301 USA | ||
|
||
# Usage: | ||
# | ||
# The list of source files containing translatable strings is defined in | ||
# POTFILES variable. The list of languages is defined in LINGUAS variable. | ||
# | ||
# After adding new translatable strings to source files the .pot file (template) | ||
# and the .po files (translations) need to be updated by running: | ||
# | ||
# make generate | ||
# | ||
# New language is added by creating a new .po file with msginit and adding | ||
# the language to LINGUAS variable in this file. | ||
# | ||
# msginit --locale=[locale] | ||
# | ||
|
||
# List of source files containing translatable strings. | ||
POTFILES = $(top_srcdir)/pam/pam.c \ | ||
$(top_srcdir)/compat/ldap_passwordpolicy_err2txt.c \ | ||
$(top_srcdir)/compat/pam_get_authtok.c | ||
|
||
# List of languages to generate translations for. | ||
LINGUAS = fi sv | ||
|
||
POTFILE = $(PACKAGE).pot | ||
POFILES = $(LINGUAS:=.po) | ||
GMOFILES = $(LINGUAS:=.gmo) | ||
|
||
# Files to clean when running make clean. | ||
CLEANFILES = $(GMOFILES) | ||
|
||
# Files to include when running make dist. | ||
EXTRA_DIST = $(POTFILE) $(POFILES) | ||
|
||
all: $(GMOFILES) | ||
|
||
# Generate .pot file and update .po files. | ||
generate: $(POTFILE) $(POFILES) | ||
|
||
# Generate .pot file from source files. | ||
$(POTFILE): $(POTFILES) | ||
xgettext --keyword=_ --language=C -o $@ $(POTFILES) | ||
|
||
# Update existing .po files with msgmerge. | ||
$(POFILES): $(POTFILE) | ||
msgmerge --update --no-fuzzy-matching $@ $< | ||
|
||
# Compile .po files into .gmo files. | ||
$(GMOFILES): %.gmo: %.po | ||
msgfmt -c -o $@ $< | ||
|
||
install-data-local: $(GMOFILES) | ||
for lang in $(LINGUAS) ; do \ | ||
$(MKDIR_P) $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES ; \ | ||
$(INSTALL) $$lang.gmo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo ; \ | ||
done |
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,83 @@ | ||
# Finnish translations for nss-pam-ldapd package. | ||
# Copyright (C) 2024 THE nss-pam-ldapd'S COPYRIGHT HOLDER | ||
# This file is distributed under the same license as the nss-pam-ldapd package. | ||
# <[email protected]>, 2024. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: nss-pam-ldapd 0.9.12\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-03-18 09:41+0000\n" | ||
"PO-Revision-Date: 2024-03-11 06:10+0000\n" | ||
"Last-Translator: <[email protected]>\n" | ||
"Language-Team: Finnish <[email protected]>\n" | ||
"Language: fi\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" | ||
|
||
#: ../pam/pam.c:719 | ||
msgid "LDAP administrator password: " | ||
msgstr "LDAP-ylläpitäjän salasana: " | ||
|
||
#: ../pam/pam.c:736 | ||
msgid "(current) LDAP Password: " | ||
msgstr "(nykyinen) LDAP-salasana: " | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:38 | ||
msgid "Password expired" | ||
msgstr "Salasana vanhentunut" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:39 | ||
msgid "Account locked" | ||
msgstr "Käyttäjätili lukittu" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:40 | ||
msgid "Change after reset" | ||
msgstr "Salasana on vaihdettava nollauksen jälkeen" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:41 | ||
msgid "Password modification not allowed" | ||
msgstr "Salasanan muuttaminen ei ole sallittua" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:42 | ||
msgid "Must supply old password" | ||
msgstr "Anna vanha salasana" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:43 | ||
msgid "Insufficient password quality" | ||
msgstr "Riittämätön salasanan laatu" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:44 | ||
msgid "Password too short" | ||
msgstr "Salasana on liian lyhyt" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:45 | ||
msgid "Password too young" | ||
msgstr "Salasana on vaihdettu liian äskettäin" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:46 | ||
msgid "Password in history" | ||
msgstr "Uusi salasana on vanhojen salasanojen luettelossa" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:47 | ||
msgid "No error" | ||
msgstr "Ei virhettä" | ||
|
||
#: ../compat/ldap_passwordpolicy_err2txt.c:48 | ||
msgid "Unknown error" | ||
msgstr "Tuntematon virhe" | ||
|
||
#: ../compat/pam_get_authtok.c:61 | ||
msgid "New Password: " | ||
msgstr "Uusi salasana: " | ||
|
||
#: ../compat/pam_get_authtok.c:62 | ||
#, c-format | ||
msgid "Retype %s" | ||
msgstr "Kirjoita uudelleen %s" | ||
|
||
#: ../compat/pam_get_authtok.c:66 | ||
msgid "Password: " | ||
msgstr "Salasana: " |
Oops, something went wrong.