Permalink
Browse files

specific translation stuff for this plugin

  • Loading branch information...
fossfreedom committed Mar 25, 2013
1 parent 713c24f commit 8bfccecd16451e8e9c006587563d570308469bc5
Showing with 148 additions and 4 deletions.
  1. +49 −0 TRANSLATE_README
  2. +5 −4 coverart_album_search.py
  3. +79 −0 po/coverartsearchproviders.pot
  4. +1 −0 po/files_to_be_translated
  5. +3 −0 po/py_files_to_be_translated
  6. +11 −0 po/update_all_po.sh
View
@@ -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/
View
@@ -39,9 +39,6 @@
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 @@ def search(self, key, last_time, store, callback, args):
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 @@ def search(self, key, last_time, store, callback, *args):
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))
@@ -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 ""
@@ -0,0 +1 @@
tmp/coverart_search_providers_prefs.ui.h
@@ -0,0 +1,3 @@
coverart_album_search.py
coverart_search_providers_prefs.py
coverart_search_providers.py
View
@@ -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

0 comments on commit 8bfccec

Please sign in to comment.