Skip to content

Commit

Permalink
Fix #35 and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeth committed Mar 18, 2021
1 parent 99677b2 commit 289dd9d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 19 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# ChangeLog for zram-init:

*zram-init-11.0:
Martin Väth <martin at mvath.de>:
- Check only for an absolute path name, not for directory presence, see
https://github.com/vaeth/zram-init/issues/35
- Add some translations. Note: then[Tab]... and else[Tab]... are not
recognized by xgettext; they have to be in a separate line

*zram-init-10.12:
Martin Väth <martin at mvath.de>:
- Make the options -M and -2 work. Thanks to GimmeHardware for the
Expand Down
20 changes: 14 additions & 6 deletions i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: zram-init\n"
"Report-Msgid-Bugs-To: Martin V\"ath <[email protected]>\n"
"POT-Creation-Date: 2020-07-11 07:16+0200\n"
"PO-Revision-Date: 2020-07-26 08:49+0200\n"
"POT-Creation-Date: 2021-03-18 19:36+0100\n"
"PO-Revision-Date: 2021-03-18 19:39+0100\n"
"Last-Translator: Martin V\"ath <[email protected]>\n"
"Language-Team: German\n"
"Language: de\n"
Expand Down Expand Up @@ -172,6 +172,14 @@ msgstr "writeback_limit ${writeback_limit} ist nicht numerisch"
msgid "failed to calculate size"
msgstr "Fehler bei Berechnung der Größe"

#, sh-format
msgid "${dir_or_empty} is not a directory path. Umounting anyway"
msgstr "${dir_or_empty} ist kein Verzeichnispfad. Hänge es trotzdem aus"

#, sh-format
msgid "${dir_or_empty} is not a directory path"
msgstr "${dir_or_empty} ist kein Verzeichnispfad"

#, sh-format
msgid "hot_add failed for ${devnode}"
msgstr "Fehler bei hot_add für ${devnode}"
Expand Down Expand Up @@ -212,6 +220,10 @@ msgstr "Fehler beim Setzen von comp_algorithm für zram${dev} auf ${algo}"
msgid "failed to set zram${dev} backing_dev"
msgstr "Fehler beim Setzen von backing_dev für zram${dev}"

#, sh-format
msgid "cannot set zram${dev} size"
msgstr "Kann Größe von zram${dev} nicht setzen"

#, sh-format
msgid "failed to set zram${dev} incompressible writeback"
msgstr "Fehler beim Setzen von unkomprimierbarem Writeback für zram${dev}"
Expand All @@ -228,10 +240,6 @@ msgstr "fehler beim Einschalten von writeback_limit für zram${dev}"
msgid "failed to set writeback_limit ${writeback_limit} for zram${dev}"
msgstr "Fehler beim Setzen von writeback_limit ${writeback_limit} für zram${dev}"

#, sh-format
msgid "cannot set zram${dev} size"
msgstr "Kann Größe von zram${dev} nicht setzen"

#, sh-format
msgid "failed to set zram${dev} mem_limit"
msgstr "Fehler beim Setzen von mem_limit für zram${dev}"
Expand Down
18 changes: 13 additions & 5 deletions i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: zram-init\n"
"Report-Msgid-Bugs-To: Martin V\"ath <[email protected]>\n"
"POT-Creation-Date: 2020-07-11 07:16+0200\n"
"POT-Creation-Date: 2021-03-18 19:36+0100\n"
"PO-Revision-Date: 2020-07-26 08:49+0200\n"
"Last-Translator: Mattéo Rossillol‑‑Laruelle <[email protected]>\n"
"Language-Team: French\n"
Expand Down Expand Up @@ -173,6 +173,14 @@ msgstr ""
msgid "failed to calculate size"
msgstr "échec du calcul de la taille"

#, sh-format
msgid "${dir_or_empty} is not a directory path. Umounting anyway"
msgstr ""

#, sh-format
msgid "${dir_or_empty} is not a directory path"
msgstr ""

#, sh-format
msgid "hot_add failed for ${devnode}"
msgstr "échec de hot_add pour ${devnode}"
Expand Down Expand Up @@ -213,6 +221,10 @@ msgstr "la valeur comp_algorithm de zram${dev} n'a pas pu être spécifiée à $
msgid "failed to set zram${dev} backing_dev"
msgstr "la valeur backing_dev de zram${dev} n'a pas pu être spécifiée"

#, sh-format
msgid "cannot set zram${dev} size"
msgstr "impossible de spécifier la taille de zram${dev}"

#, sh-format
msgid "failed to set zram${dev} incompressible writeback"
msgstr ""
Expand All @@ -229,10 +241,6 @@ msgstr ""
msgid "failed to set writeback_limit ${writeback_limit} for zram${dev}"
msgstr ""

#, sh-format
msgid "cannot set zram${dev} size"
msgstr "impossible de spécifier la taille de zram${dev}"

#, sh-format
msgid "failed to set zram${dev} mem_limit"
msgstr "la valeur mem_limit de zram${dev} n'a pas pu être spécifiée"
Expand Down
22 changes: 14 additions & 8 deletions sbin/zram-init.in
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,20 @@ if [ $# -eq 2 ]
then swap=false
mount=:
dir=${2%/}
if [ x"$dir" = x'-' ]
then mount=false
elif [ -z "$dir" ] || ! test -d "$dir"
then if $umount
then xWarning '${dir:-(empty)} is not a directory. Umounting anyway'
else xFatal '${dir:-(empty)} is not a directory'
fi
fi
case $dir in
'-')
mount=false;;
'/'*)
:;;
*)
dir_or_empty=${dir:-(empty)}
if $umount
then
xWarning '${dir_or_empty} is not a directory path. Umounting anyway'
else
xFatal '${dir_or_empty} is not a directory path'
fi;;
esac
fi

HotAdd() {
Expand Down

0 comments on commit 289dd9d

Please sign in to comment.