specific translation stuff for this plugin

Esse commit está contido em:
fossfreedom
2013-03-25 19:45:17 +00:00
commit 8bfccecd16
6 arquivos alterados com 148 adições e 4 exclusões
+49
Ver Arquivo
@@ -0,0 +1,49 @@
# This README is dividied into two sections -
# first section is for the coverart-browser developers
# second section is for Translators
# Section 1: Developers Only
#+++++++++++++++++++++++++++
#for each ui file run the following to create translation .h files
intltool-extract --local --type=gettext/glade ui/coverart_search_providers_prefs.ui
#create a new template file called po/package.pot by running below
# po/files_to_be_translated are all the .h files generated by intltool
xgettext -c -a -f po/files_to_be_translated -o po/coverartsearchproviders.pot
# po/py_files_to_be_translated are all the python files to be translated
xgettext -c -j -f po/py_files_to_be_translated -o po/coverartsearchproviders.pot
#now update existing po's with changes in the template file package.pot
cd po
./update_all_po.sh
#cleanup
cd ..
rm -rf tmp
# Section 2: Translators
#+++++++++++++++++++++++
The best way to create translations is to visit our Launchpad site
- https://translations.launchpad.net/coverartbrowser
Set your preferred language and then just begin translating
If you dont want to use Launchpad, use the following instructions
# Carry out the following - one or the other (or both!)
#create a new locale file from this template:
cd po; msginit --no-translator
#create a new specific (e.g. spanish) locale file from this template:
cd po; msginit --no-translator -l es
#Take special care with "Fuzzy" translations. "Fuzzy" lines should be
#removed - the string should be carefully examined since these are often
#automated translations.
#run lang.sh to compile and install the po files
sudo ./lang.sh /usr/share/locale/
+5 -4
Ver Arquivo
@@ -39,9 +39,6 @@ import json
import rb
from gi.repository import RB
# coverartarchive URL
COVERARTARCHIVE_RELEASE_URL = "http://coverartarchive.org/release/%s/"
ITEMS_PER_NOTIFICATION = 10
IGNORED_SCHEMES = ('http', 'cdda', 'daap', 'mms')
REPEAT_SEARCH_PERIOD = 86400 * 7
@@ -332,6 +329,10 @@ class DiscogsSearch (object):
class CoverartArchiveSearch(object):
def __init__(self):
# coverartarchive URL
self.url = "http://coverartarchive.org/release/%s/"
def get_release_cb (self, data, args):
(key, store, callback, cbargs) = args
if data is None:
@@ -360,7 +361,7 @@ class CoverartArchiveSearch(object):
callback(True)
return
url = COVERARTARCHIVE_RELEASE_URL % (album_id)
url = url % (album_id)
print url
loader = rb.Loader()
loader.get_url(url, self.get_release_cb, (key, store, callback, args))
+79
Ver Arquivo
@@ -0,0 +1,79 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-25 19:18+0000\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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: tmp/coverart_search_providers_prefs.ui.h:1
msgid "Choose Search Providers:"
msgstr ""
#: tmp/coverart_search_providers_prefs.ui.h:2
msgid "Provider"
msgstr ""
#: tmp/coverart_search_providers_prefs.ui.h:3
msgid "Search"
msgstr ""
#: coverart_album_search.py:311 coverart_album_search.py:312
msgid "Unknown"
msgstr ""
#: coverart_search_providers_prefs.py:135
msgid "Embedded coverart"
msgstr ""
#: coverart_search_providers_prefs.py:136
msgid "Local folder coverart"
msgstr ""
#: coverart_search_providers_prefs.py:137
msgid "Cached coverart"
msgstr ""
#: coverart_search_providers_prefs.py:138
msgid "LastFM Internet Provider"
msgstr ""
#: coverart_search_providers_prefs.py:139
msgid "MusicBrainz Internet Provider"
msgstr ""
#: coverart_search_providers_prefs.py:140
msgid "Discogs Internet Provider"
msgstr ""
#: coverart_search_providers_prefs.py:141
msgid "Coverart Archive Internet Provider"
msgstr ""
#. define .plugin text strings used for translation
#: coverart_search_providers.py:65
msgid "CoverArt Browser Search Providers"
msgstr ""
#: coverart_search_providers.py:66
msgid "Additional coverart search providers for Rhythmbox"
msgstr ""
#: coverart_search_providers.py:96
msgid "Conflicting plugin found."
msgstr ""
#: coverart_search_providers.py:98
msgid "The ArtSearch plugin has been deactivated"
msgstr ""
+1
Ver Arquivo
@@ -0,0 +1 @@
tmp/coverart_search_providers_prefs.ui.h
+3
Ver Arquivo
@@ -0,0 +1,3 @@
coverart_album_search.py
coverart_search_providers_prefs.py
coverart_search_providers.py
Arquivo executável
+11
Ver Arquivo
@@ -0,0 +1,11 @@
#!/bin/sh
echo "updating po files"
for i in *.po; do
lang=`basename $i .po`
echo "updating $lang"
intltool-update --dist $lang -g coverartsearchproviders
done
echo "update plugin file"
intltool-merge -d . ../coverart_search_providers.plugin.in ../coverart_search_providers.plugin