Skip to content

Commit

Permalink
Automatically translate date formats in po files.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-baumann committed Jun 5, 2012
1 parent e938dc7 commit 80e7f34
Show file tree
Hide file tree
Showing 19 changed files with 68 additions and 34 deletions.
36 changes: 35 additions & 1 deletion manpages/bin/update-version.sh
@@ -1,11 +1,24 @@
#!/bin/sh

## live-boot(7) - System Boot Scripts
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## live-boot comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.


set -e

DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"
PROGRAM="LIVE\\\-BOOT"
VERSION="$(cat ../VERSION)"

DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"

DAY="$(LC_ALL=C date +%d)"
MONTH="$(LC_ALL=C date +%m)"
YEAR="$(LC_ALL=C date +%Y)"

echo "Updating version headers..."

for MANPAGE in en/*
Expand All @@ -14,3 +27,24 @@ do

sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Debian Live Project\"|" ${MANPAGE}
done

# European date format
for _LANGUAGE in de es fr it
do
if ls po/${_LANGUAGE}/*.po > /dev/null 2>&1
then
for _FILE in po/${_LANGUAGE}/*.po
do
sed -i -e "s|^msgstr .*.2012\"$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" "${_FILE}"
done
fi
done

# Brazilian date format
if ls po/pt_BR/*.po > /dev/null 2>&1
then
for _FILE in po/pt_BR/*.po
do
sed -i -e "s|^msgstr .*-2012\"$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" "${_FILE}"
done
fi
2 changes: 1 addition & 1 deletion manpages/de/live-boot.de.7
Expand Up @@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BOOT 7 2012\-06\-04 3.0~a28\-1 "Debian Live Project"
.TH LIVE\-BOOT 7 05.06.2012 3.0~a28\-1 "Debian Live Project"

.SH NAME
\fBlive\-boot\fP \- System Boot Scripts
Expand Down
2 changes: 1 addition & 1 deletion manpages/de/live-persistence.conf.de.5
Expand Up @@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BOOT conf 2012\-06\-04 3.0~a28\-1 "Debian Live Project"
.TH LIVE\-BOOT conf 05.06.2012 3.0~a28\-1 "Debian Live Project"

.SH NAME
\fBlive\-persistence.conf\fP \- Configuration file for persistence media in
Expand Down
2 changes: 1 addition & 1 deletion manpages/de/live-snapshot.de.1
Expand Up @@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BOOT 1 2012\-06\-04 3.0~a28\-1 "Debian Live Project"
.TH LIVE\-BOOT 1 05.06.2012 3.0~a28\-1 "Debian Live Project"

.SH NAME
\fBlive\-snapshot\fP \- simple script to ease persistence usage
Expand Down
2 changes: 1 addition & 1 deletion manpages/en/live-boot.7
@@ -1,4 +1,4 @@
.TH LIVE\-BOOT 7 2012\-06\-04 3.0~a28-1 "Debian Live Project"
.TH LIVE\-BOOT 7 2012\-06\-05 3.0~a28-1 "Debian Live Project"

.SH NAME
\fBlive\-boot\fR \- System Boot Scripts
Expand Down
2 changes: 1 addition & 1 deletion manpages/en/live-persistence.conf.5
@@ -1,4 +1,4 @@
.TH LIVE\-BOOT conf 2012\-06\-04 3.0~a28-1 "Debian Live Project"
.TH LIVE\-BOOT conf 2012\-06\-05 3.0~a28-1 "Debian Live Project"

.SH NAME
\fBlive-persistence.conf\fR \- Configuration file for persistence media in
Expand Down
2 changes: 1 addition & 1 deletion manpages/en/live-snapshot.1
@@ -1,4 +1,4 @@
.TH LIVE\-BOOT 1 2012\-06\-04 3.0~a28-1 "Debian Live Project"
.TH LIVE\-BOOT 1 2012\-06\-05 3.0~a28-1 "Debian Live Project"

.SH NAME
\fBlive\-snapshot\fR \- simple script to ease persistence usage
Expand Down
2 changes: 1 addition & 1 deletion manpages/es/live-boot.es.7
Expand Up @@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BOOT 7 04.06.2012 3.0~a28\-1 "Proyecto Debian Live"
.TH LIVE\-BOOT 7 05.06.2012 3.0~a28\-1 "Proyecto Debian Live"

.SH NOMBRE
\fBlive\-boot\fP \- Scripts de Arranque del Sistema
Expand Down
2 changes: 1 addition & 1 deletion manpages/es/live-persistence.conf.es.5
Expand Up @@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BOOT conf 04.06.2012 3.0~a28\-1 "Proyecto Debian Live"
.TH LIVE\-BOOT conf 05.06.2012 3.0~a28\-1 "Proyecto Debian Live"

.SH NOMBRE
\fBlive\-persistence.conf\fP \- Fichero para configurar medios de almacenamiento
Expand Down
2 changes: 1 addition & 1 deletion manpages/es/live-snapshot.es.1
Expand Up @@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BOOT 1 04.06.2012 3.0~a28\-1 "Proyecto Debian Live"
.TH LIVE\-BOOT 1 05.06.2012 3.0~a28\-1 "Proyecto Debian Live"

.SH NOMBRE
\fBlive\-snapshot\fP \- sencillo script para facilitar el uso de la persistencia
Expand Down
6 changes: 3 additions & 3 deletions manpages/po/de/live-boot.7.po
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot 3.0~a28-1\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: 2012-04-08 22:48+0300\n"
"Last-Translator: Daniel Baumann <daniel@debian.org>\n"
"Language-Team: none\n"
Expand All @@ -24,8 +24,8 @@ msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgstr ""
msgid "2012-06-05"
msgstr "05.06.2012"

#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
Expand Down
6 changes: 3 additions & 3 deletions manpages/po/de/live-persistence.conf.5.po
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot 3.0~a28-1\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: 2012-04-08 22:48+0300\n"
"Last-Translator: Daniel Baumann <daniel@debian.org>\n"
"Language-Team: none\n"
Expand All @@ -24,8 +24,8 @@ msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgstr ""
msgid "2012-06-05"
msgstr "05.06.2012"

#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
Expand Down
6 changes: 3 additions & 3 deletions manpages/po/de/live-snapshot.1.po
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot 3.0~a28-1\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: 2012-04-08 22:48+0300\n"
"Last-Translator: Daniel Baumann <daniel@debian.org>\n"
"Language-Team: none\n"
Expand All @@ -24,8 +24,8 @@ msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgstr ""
msgid "2012-06-05"
msgstr "05.06.2012"

#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
Expand Down
6 changes: 3 additions & 3 deletions manpages/po/es/live-boot.7.po
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot 3.0~a28-1\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: 2012-05-13 18:30+0100\n"
"Last-Translator: Carlos Zuferri «chals» <chals@altorricon.com>\n"
"Language-Team: none\n"
Expand All @@ -24,8 +24,8 @@ msgstr "LIVE-BOOT"
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgstr "04.06.2012"
msgid "2012-06-05"
msgstr "05.06.2012"

#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
Expand Down
6 changes: 3 additions & 3 deletions manpages/po/es/live-persistence.conf.5.po
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot 3.0~a28-1\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: \n"
"Last-Translator: Carlos Zuferri «chals» <chals@altorricon.com>\n"
"Language-Team: none\n"
Expand All @@ -23,8 +23,8 @@ msgstr "LIVE-BOOT"
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgstr "04.06.2012"
msgid "2012-06-05"
msgstr "05.06.2012"

#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
Expand Down
6 changes: 3 additions & 3 deletions manpages/po/es/live-snapshot.1.po
Expand Up @@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot 3.0~a28-1\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: 2012-05-13 18:37+0100\n"
"Last-Translator: Carlos Zuferri «chals» <chals@altorricon.com>\n"
"Language-Team: none\n"
Expand All @@ -23,8 +23,8 @@ msgstr "LIVE-BOOT"
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgstr "04.06.2012"
msgid "2012-06-05"
msgstr "05.06.2012"

#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
Expand Down
4 changes: 2 additions & 2 deletions manpages/pot/live-boot.7.pot
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot VERSION\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -25,7 +25,7 @@ msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgid "2012-06-05"
msgstr ""

#. type: TH
Expand Down
4 changes: 2 additions & 2 deletions manpages/pot/live-persistence.conf.5.pot
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot VERSION\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -25,7 +25,7 @@ msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgid "2012-06-05"
msgstr ""

#. type: TH
Expand Down
4 changes: 2 additions & 2 deletions manpages/pot/live-snapshot.1.pot
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: live-boot VERSION\n"
"POT-Creation-Date: 2012-06-04 17:31+0300\n"
"POT-Creation-Date: 2012-06-05 13:42+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -25,7 +25,7 @@ msgstr ""
#. type: TH
#: en/live-boot.7:1 en/live-persistence.conf.5:1 en/live-snapshot.1:1
#, no-wrap
msgid "2012-06-04"
msgid "2012-06-05"
msgstr ""

#. type: TH
Expand Down

0 comments on commit 80e7f34

Please sign in to comment.