[lastbash-cvs] SF.net SVN: lastbash: [229] lastbash
Status: Beta
Brought to you by:
cstroie
|
From: <cs...@us...> - 2007-04-17 17:15:30
|
Revision: 229
http://lastbash.svn.sourceforge.net/lastbash/?rev=229&view=rev
Author: cstroie
Date: 2007-04-17 10:15:27 -0700 (Tue, 17 Apr 2007)
Log Message:
-----------
Initial support for l10n.
Modified Paths:
--------------
lastbash/Makefile
lastbash/lastbash
Added Paths:
-----------
lastbash/po/
lastbash/po/de.po
lastbash/po/fr.po
lastbash/po/header.pot
lastbash/po/ro.po
lastbash/po/ru.po
Modified: lastbash/Makefile
===================================================================
--- lastbash/Makefile 2007-03-26 15:41:01 UTC (rev 228)
+++ lastbash/Makefile 2007-04-17 17:15:27 UTC (rev 229)
@@ -4,7 +4,7 @@
# Project name and version
name = lastbash
-version = 0.3.2
+version = 0.3.3
# Targets
proglist = lastbash
@@ -23,6 +23,23 @@
datadir = $(DESTDIR)$(prefix)/share/$(name)
srcdir = .
+# Languages
+languages = ro fr de ru
+
+# Translation catalogs, directories and files
+po_dir = po
+pot = $(po_dir)/$(name).pot
+pot_header = $(po_dir)/header.pot
+
+po_files = $(addprefix $(po_dir)/, $(addsuffix .po, $(languages)))
+mo_files = $(addprefix $(TEXTDOMAINDIR)/, $(addsuffix /$(CATEGORY)/$(TEXTDOMAIN).mo, $(languages)))
+mo_dirs = $(addprefix $(TEXTDOMAINDIR)/, $(addsuffix /$(CATEGORY), $(languages)))
+
+# Localization settings
+TEXTDOMAIN = $(name)
+TEXTDOMAINDIR = messages
+CATEGORY = LC_MESSAGES
+
# Tools
MKDIR = mkdir
INSTALL = install
@@ -55,6 +72,34 @@
lastbash.config: lastbash.config.in
$(SED) -e '/^HTML_TEMPLATE/s/@HTML_TEMPLATE@/$${HOME_DIR}\/lastbash_template.html/g' $< > $@
+# Create the pot file
+pot: $(pot)
+
+$(po_dir)/%.pot: % $(pot_header)
+ cat $(pot_header) | \
+ sed "/POT-Creation-Date:/s/DATE/`date "+%Y-%m-%d %H:%M%z"`/g" | \
+ sed "/Project-Id-Version:/s/NAME-VERSION/$(name)-$(version)/g" > $@
+ bash --dump-po-strings $< | msguniq >> $@
+
+# Update the existing catalogs
+po: $(po_files)
+
+$(po_dir)/%.po: $(pot)
+ test -f $@ && \
+ msgmerge --update --backup=simple --suffix=.bak --force-po --no-wrap --sort-by-file $@ $< || \
+ msginit -i $< -o $@ -l $* --no-translator --no-wrap
+
+# Make the mo files
+mo: $(mo_dirs) $(mo_files)
+
+$(TEXTDOMAINDIR)/%/$(CATEGORY)/$(TEXTDOMAIN).mo: $(po_dir)/%.po
+ msgfmt --check --statistics -o $@ $<
+
+# Output directories for mo files
+$(mo_dirs):
+ mkdir -p $@
+
+
# Install section
install: config install_dirs install_prog install_conf install_man install_doc
Modified: lastbash/lastbash
===================================================================
--- lastbash/lastbash 2007-03-26 15:41:01 UTC (rev 228)
+++ lastbash/lastbash 2007-04-17 17:15:27 UTC (rev 229)
@@ -37,8 +37,8 @@
# Program identification
PROG_NAME="lastbash"
PROG_TITLE="LastBASH"
-PROG_DESC="Console player for Last.fm"
-PROG_VER="0.3.2"
+PROG_DESC=$"Console player for Last.fm"
+PROG_VER="0.3.3"
AUTHOR="Costin Stroie"
AUTHOR_EMAIL="cs...@us..."
@@ -90,12 +90,16 @@
# Set some shell options
shopt -s nocasematch
+# Localization stuff
+TEXTDOMAIN="lastbash"
+TEXTDOMAINDIR="messages"
+
# Labels
-LBL_ARTIST="Artist"
-LBL_ALBUM="Album"
-LBL_TRACK="Title"
-LBL_LENGTH="Length"
-LBL_ACTION="Action"
+LBL_ARTIST=$"Artist"
+LBL_ALBUM=$"Album"
+LBL_TRACK=$"Title"
+LBL_LENGTH=$"Length"
+LBL_ACTION=$"Action"
# Home directory and configuration files
#-----------------------------------------------------------------------------
@@ -119,8 +123,10 @@
#-----------------------------------------------------------------------------
function debug_header()
{
+ local MSG
+ printf -v MSG " %s `date`" $"Debug session started on"
debug "--------------------------------------------------------"
- debug " Debug session started on `date`"
+ debug "${MSG}"
debug "--------------------------------------------------------"
}
@@ -128,8 +134,10 @@
#-----------------------------------------------------------------------------
function debug_footer()
{
+ local MSG
+ printf -v MSG " %s `date`" $"Debug session ended on"
debug "--------------------------------------------------------"
- debug " Debug session ended on `date`"
+ debug "${MSG}"
debug "--------------------------------------------------------"
}
@@ -226,7 +234,7 @@
fi
# The first row contains the columns titles
- [ -f "${HISTORY_CVS_FILE}" ] || echo "\"Artist\",\"Album\",\"Track\",\"Length\",\"Action\"" > "${HISTORY_CVS_FILE}"
+ [ -f "${HISTORY_CVS_FILE}" ] || echo "\"${LBL_ARTIST}\",\"${LBL_ALBUM}\",\"${LBL_TRACK}\",\"${LBL_LENGTH}\",\"${LBL_ACTION}\"" > "${HISTORY_CVS_FILE}"
local ARTIST ALBUM TRACK DURATION ACTION
@@ -271,13 +279,14 @@
#-----------------------------------------------------------------------------
function init()
{
- local P MP
+ local P MP MSG
# Check the bash version
if [ "${BASH_VERSINFO[0]}" -lt "3" ]
then
- echo "Bash version 3 is needed."
- debug "${FUNCNAME}: Unsupported Bash version: $BASH_VERSION"
+ echo $"Bash version 3 is needed."
+ printf -v MSG "%s: %s: %s" "${FUNCNAME}" $"Unsupported Bash version" "${BASH_VERSION}"
+ debug "${MSG}"
exit 1
fi
@@ -1123,7 +1132,7 @@
then
MSG="${META_STATION}"
else
- MSG="Not streaming, please launch the player"
+ MSG=$"Not streaming, please launch the player"
fi
# Format the status line
@@ -1388,7 +1397,7 @@
local PREV_ACTION="${META_ACTION}"
# Set the status line
- tui_sbar "Retrieving metadata..."
+ tui_sbar $"Retrieving metadata..."
# Fetch the metadata
if lastfm_metadata "${LASTFM_SESSION}"
@@ -1432,7 +1441,7 @@
RET="0"
else
RET="1"
- tui_sbar "Metadata retrieving failed"
+ tui_sbar $"Metadata retrieving failed"
fi
# Restore the status bar
@@ -1450,7 +1459,7 @@
local RET
# Set the status line
- tui_sbar "Connecting to Last.fm..."
+ tui_sbar $"Connecting to Last.fm..."
# Try connecting
lastfm_connect "${LASTFM_USER}" "${LASTFM_PASS}"
@@ -1466,20 +1475,20 @@
tui_lastfm_station "${LASTFM_STATION}"
else
# Update the status line
- tui_sbar "Connected"
+ tui_sbar $"Connected"
sleep 1
# Get the initial metadata
tui_metadata
fi
elif [ "${RET}" == "2" ]
then
- tui_sbar "Last.fm session failed, check credentials"
+ tui_sbar $"Last.fm session failed, check credentials"
elif [ "${RET}" == "3" ]
then
- tui_sbar "Player banned, contact the author"
+ tui_sbar $"Player banned, contact the author"
else
RET="1"
- tui_sbar "Last.fm handshake failed"
+ tui_sbar $"Last.fm handshake failed"
fi
# Return the status code
@@ -1495,7 +1504,7 @@
local RET ERRMSG
# Set the status line
- tui_sbar "Setting new Last.fm station..."
+ tui_sbar $"Setting new Last.fm station..."
# Try changing the station
lastfm_station "${LASTFM_SESSION}" "$1"
Added: lastbash/po/de.po
===================================================================
--- lastbash/po/de.po (rev 0)
+++ lastbash/po/de.po 2007-04-17 17:15:27 UTC (rev 229)
@@ -0,0 +1,93 @@
+# Translation catalog for LastBASH
+# Copyright (C) 2007 Costin Stroie <cs...@us...>
+# This file is distributed under the same license as the lastbash package.
+# $Id: header.pot 29 2007-02-28 15:55:54Z cstroie $
+# vim: set ft=po nowrap nu enc=utf8:
+msgid ""
+msgstr ""
+"Project-Id-Version: lastbash-0.3.3\n"
+"POT-Creation-Date: 2007-04-17 20:02+0300\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"PO-Revision-Date: 2007-04-17 20:10+0300\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: lastbash:102
+msgid "Action"
+msgstr "Tätigkeit "
+
+#: lastbash:99
+msgid "Album"
+msgstr "Album "
+
+#: lastbash:98
+msgid "Artist"
+msgstr "Künstler "
+
+#: lastbash:287
+msgid "Bash version 3 is needed."
+msgstr "Schlagversion 3 ist erforderlich. "
+
+#: lastbash:1478
+msgid "Connected"
+msgstr "Angeschlossen "
+
+#: lastbash:1462
+msgid "Connecting to Last.fm..."
+msgstr "Anschließen an Last.fm… "
+
+#: lastbash:40
+msgid "Console player for Last.fm"
+msgstr "Konsole Spieler für Last.fm "
+
+#: lastbash:138
+msgid "Debug session ended on"
+msgstr "Den Lernabschnitt ausprüfen, der an beendet wird "
+
+#: lastbash:127
+msgid "Debug session started on"
+msgstr "Den Lernabschnitt ausprüfen, der an begonnen wird "
+
+#: lastbash:1491
+msgid "Last.fm handshake failed"
+msgstr "Last.fm Händedruck fällt aus "
+
+#: lastbash:1485
+msgid "Last.fm session failed, check credentials"
+msgstr "Last.fm Lernabschnitt fiel, überprüfung Bescheinigungen aus "
+
+#: lastbash:101
+msgid "Length"
+msgstr "Länge "
+
+#: lastbash:1444
+msgid "Metadata retrieving failed"
+msgstr "Metadatenzurückholen verlassen "
+
+#: lastbash:1135
+msgid "Not streaming, please launch the player"
+msgstr "Nicht strömend, den Spieler bitte ausstoßen "
+
+#: lastbash:1488
+msgid "Player banned, contact the author"
+msgstr "Der verbotene Spieler, treten mit dem Autor in Verbindung "
+
+#: lastbash:1400
+msgid "Retrieving metadata..."
+msgstr "Metadaten zurückholen… "
+
+#: lastbash:1507
+msgid "Setting new Last.fm station..."
+msgstr "Einstellung neue Last.fm Station… "
+
+#: lastbash:100
+msgid "Title"
+msgstr "Titel "
+
+#: lastbash:288
+msgid "Unsupported Bash version"
+msgstr "Ungestützte Schlagversion "
+
Added: lastbash/po/fr.po
===================================================================
--- lastbash/po/fr.po (rev 0)
+++ lastbash/po/fr.po 2007-04-17 17:15:27 UTC (rev 229)
@@ -0,0 +1,93 @@
+# Translation catalog for LastBASH
+# Copyright (C) 2007 Costin Stroie <cs...@us...>
+# This file is distributed under the same license as the lastbash package.
+# $Id: header.pot 29 2007-02-28 15:55:54Z cstroie $
+# vim: set ft=po nowrap nu enc=utf8:
+msgid ""
+msgstr ""
+"Project-Id-Version: lastbash-0.3.3\n"
+"POT-Creation-Date: 2007-04-17 20:02+0300\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"PO-Revision-Date: 2007-04-17 20:11+0300\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: lastbash:102
+msgid "Action"
+msgstr "Action "
+
+#: lastbash:99
+msgid "Album"
+msgstr "Album "
+
+#: lastbash:98
+msgid "Artist"
+msgstr "Artiste "
+
+#: lastbash:287
+msgid "Bash version 3 is needed."
+msgstr "La version 3 de Bash est nécessaire."
+
+#: lastbash:1478
+msgid "Connected"
+msgstr "Relié "
+
+#: lastbash:1462
+msgid "Connecting to Last.fm..."
+msgstr "Se relier à Last.fm… "
+
+#: lastbash:40
+msgid "Console player for Last.fm"
+msgstr "Joueur de console pour Last.fm "
+
+#: lastbash:138
+msgid "Debug session ended on"
+msgstr "Corriger la session finie dessus "
+
+#: lastbash:127
+msgid "Debug session started on"
+msgstr "Corriger la session commencée dessus "
+
+#: lastbash:1491
+msgid "Last.fm handshake failed"
+msgstr "La poignée de main de Last.fm échoue "
+
+#: lastbash:1485
+msgid "Last.fm session failed, check credentials"
+msgstr "La session de Last.fm a échoué, des qualifications de contrôle "
+
+#: lastbash:101
+msgid "Length"
+msgstr "Longueur "
+
+#: lastbash:1444
+msgid "Metadata retrieving failed"
+msgstr "Recherche de méta-données échouée "
+
+#: lastbash:1135
+msgid "Not streaming, please launch the player"
+msgstr "En ne coulant pas, lancer svp le joueur "
+
+#: lastbash:1488
+msgid "Player banned, contact the author"
+msgstr "Le joueur interdit, contactent l'auteur "
+
+#: lastbash:1400
+msgid "Retrieving metadata..."
+msgstr "Recherchant des méta-données… "
+
+#: lastbash:1507
+msgid "Setting new Last.fm station..."
+msgstr "Plaçant la nouvelle station de Last.fm… "
+
+#: lastbash:100
+msgid "Title"
+msgstr "Titre"
+
+#: lastbash:288
+msgid "Unsupported Bash version"
+msgstr "Version non soutenue de coup "
+
Added: lastbash/po/header.pot
===================================================================
--- lastbash/po/header.pot (rev 0)
+++ lastbash/po/header.pot 2007-04-17 17:15:27 UTC (rev 229)
@@ -0,0 +1,15 @@
+# Translation catalog for LastBASH
+# Copyright (C) 2007 Costin Stroie <cs...@us...>
+# This file is distributed under the same license as the lastbash package.
+# $Id: header.pot 29 2007-02-28 15:55:54Z cstroie $
+# vim: set ft=po nowrap nu enc=utf8:
+msgid ""
+msgstr ""
+"Project-Id-Version: NAME-VERSION\n"
+"POT-Creation-Date: DATE\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
Added: lastbash/po/ro.po
===================================================================
--- lastbash/po/ro.po (rev 0)
+++ lastbash/po/ro.po 2007-04-17 17:15:27 UTC (rev 229)
@@ -0,0 +1,91 @@
+# Translation catalog for lastbash
+# Copyright (C) 2006 Costin Stroie <cs...@us...>
+# This file is distributed under the same license as the lastbash package.
+# $Id: ro.po 28 2007-02-28 15:55:29Z cstroie $
+# vim: set ft=po nowrap nu enc=utf8:
+msgid ""
+msgstr ""
+"Project-Id-Version: subproc\n"
+"POT-Creation-Date: 2007-04-17 19:57+0300\n"
+"PO-Revision-Date: 2007-04-17 19:59+0300\n"
+"Last-Translator: Costin Stroie <cs...@us...>\n"
+"Language-Team: ro_RO\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lastbash:40
+msgid "Console player for Last.fm"
+msgstr "Player in consolă pentru Last.fm"
+
+#: lastbash:98
+msgid "Artist"
+msgstr "Artist"
+
+#: lastbash:99
+msgid "Album"
+msgstr "Album"
+
+#: lastbash:100
+msgid "Title"
+msgstr "Titlu"
+
+#: lastbash:101
+msgid "Length"
+msgstr "Durată"
+
+#: lastbash:102
+msgid "Action"
+msgstr "Acţiune"
+
+#: lastbash:127
+msgid "Debug session started on"
+msgstr "Sesiune de depanare iniţiată la"
+
+#: lastbash:138
+msgid "Debug session ended on"
+msgstr "Sesiune de depanare încheiată la"
+
+#: lastbash:287
+msgid "Bash version 3 is needed."
+msgstr "Este necesară versiunea Bash 3."
+
+#: lastbash:288
+msgid "Unsupported Bash version"
+msgstr "Versiune Bash nesuportată"
+
+#: lastbash:1135
+msgid "Not streaming, please launch the player"
+msgstr "Lansaţi playerul"
+
+#: lastbash:1400
+msgid "Retrieving metadata..."
+msgstr "Descărcare metadata..."
+
+#: lastbash:1444
+msgid "Metadata retrieving failed"
+msgstr "Decărcarea metadata a eşuat"
+
+#: lastbash:1462
+msgid "Connecting to Last.fm..."
+msgstr "În conectare la Last.fm..."
+
+#: lastbash:1478
+msgid "Connected"
+msgstr "Conectat"
+
+#: lastbash:1485
+msgid "Last.fm session failed, check credentials"
+msgstr "Sesiunea Last.fm a eşuat, verificaţi datele de autentificare"
+
+#: lastbash:1488
+msgid "Player banned, contact the author"
+msgstr "Playerul este interzis, contactaţi autorul"
+
+#: lastbash:1491
+msgid "Last.fm handshake failed"
+msgstr "Negocierea Last.fm a eşuat"
+
+#: lastbash:1507
+msgid "Setting new Last.fm station..."
+msgstr "Stabilim o nouă staţie Last.fm..."
Added: lastbash/po/ru.po
===================================================================
--- lastbash/po/ru.po (rev 0)
+++ lastbash/po/ru.po 2007-04-17 17:15:27 UTC (rev 229)
@@ -0,0 +1,112 @@
+# Translation catalog for LastBASH
+# Copyright (C) 2007 Costin Stroie <cs...@us...>
+# This file is distributed under the same license as the lastbash package.
+# $Id: header.pot 29 2007-02-28 15:55:54Z cstroie $
+# vim: set ft=po nowrap nu enc=utf8:
+msgid ""
+msgstr ""
+"Project-Id-Version: lastbash-0.3.3\n"
+"POT-Creation-Date: 2007-04-17 20:02+0300\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"PO-Revision-Date: 2007-04-17 20:12+0300\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: lastbash:102
+#, fuzzy
+msgid "Action"
+msgstr "Действий "
+
+#: lastbash:99
+#, fuzzy
+msgid "Album"
+msgstr " "
+
+#: lastbash:98
+#, fuzzy
+msgid "Artist"
+msgstr " "
+
+#: lastbash:287
+#, fuzzy
+msgid "Bash version 3 is needed."
+msgstr "Bash, версия 3 не требуется. "
+
+#: lastbash:1478
+#, fuzzy
+msgid "Connected"
+msgstr "Подключен "
+
+#: lastbash:1462
+#, fuzzy
+msgid "Connecting to Last.fm..."
+msgstr "Подключение к Last.fm. .. "
+
+#: lastbash:40
+#, fuzzy
+msgid "Console player for Last.fm"
+msgstr "Консоль игрока на Last.fm "
+
+#: lastbash:138
+#, fuzzy
+msgid "Debug session ended on"
+msgstr "Отладка сессия закончилась "
+
+#: lastbash:127
+#, fuzzy
+msgid "Debug session started on"
+msgstr "Отладка сессия началась "
+
+#: lastbash:1491
+#, fuzzy
+msgid "Last.fm handshake failed"
+msgstr "Last.fm не рукопожатие "
+
+#: lastbash:1485
+#, fuzzy
+msgid "Last.fm session failed, check credentials"
+msgstr "Last.fm не сессии, проверьте полномочия "
+
+#: lastbash:101
+#, fuzzy
+msgid "Length"
+msgstr " "
+
+#: lastbash:1444
+#, fuzzy
+msgid "Metadata retrieving failed"
+msgstr "Метаданные поиска не "
+
+#: lastbash:1135
+#, fuzzy
+msgid "Not streaming, please launch the player"
+msgstr "Не в потоковом режиме, можно начать игрок "
+
+#: lastbash:1488
+#, fuzzy
+msgid "Player banned, contact the author"
+msgstr "Игроку запрещен, связаться с автором "
+
+#: lastbash:1400
+#, fuzzy
+msgid "Retrieving metadata..."
+msgstr "Получение метаданных ... "
+
+#: lastbash:1507
+#, fuzzy
+msgid "Setting new Last.fm station..."
+msgstr "Установка новых Last.fm станции ... "
+
+#: lastbash:100
+#, fuzzy
+msgid "Title"
+msgstr " "
+
+#: lastbash:288
+#, fuzzy
+msgid "Unsupported Bash version"
+msgstr "Неподдерживаемая версия Bash "
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|