Permalink
Browse files

initial translation conversion

  • Loading branch information...
1 parent 1cbcf53 commit 63672aea9e12ef3932cea4553d092b8ea56df893 @fossfreedom committed Oct 9, 2012
Showing with 33 additions and 20 deletions.
  1. +8 −1 TRANSLATE_README
  2. +3 −0 babel.cfg
  3. +2 −0 coverart_browser.py
  4. +19 −18 tmpl/albumartsearch-tmpl.html
  5. +1 −1 tmpl/albumartsearchempty-tmpl.html
View
@@ -10,7 +10,14 @@ intltool-extract --type=gettext/glade ui/coverart_browser.ui
intltool-extract --type=gettext/glade ui/coverart_entryview.ui
#create a new template file called po/package.pot by running
-pygettext -d package -k _ -k N_ -p po *.py ui/*.h
+pygettext -d ui -k _ -k N_ -p po *.py ui/*.h
+
+#create a template file for the mako templates
+pybabel extract -F babel.cfg -o po/tmpl.pot .
+
+#now combine the pot files
+cd po
+msgcat ui.pot tmpl.pot -o package.pot
#now update existing po's with changes in the template file package.pot
./update_all_po.sh
View
@@ -0,0 +1,3 @@
+# Extraction from Genshi HTML and text templates
+[mako: **/tmpl/**.html]
+input_encoding = utf-8
View
@@ -93,6 +93,8 @@ def do_activate(self):
self.shell.register_entry_type_for_source(self.source, entry_type)
self.shell.append_display_page(self.source, group)
+ self.shell.props.display_page_tree.select(self.source)
+
print "CoverArtBrowser DEBUG - end do_activate"
def do_deactivate(self):
@@ -123,11 +123,12 @@
if (searchdiv.style.display=="none") {
searchdiv.style.display="block";
- linkObj.innerText="Search Options: [-]";
+ linkObj.innerText=${_("Search Options")}+": [-]";
} else {
searchdiv.style.display="none";
- linkObj.innerText="Search Options: [+]";
+ ## TRANSLATORS: jkjkjkj
+ linkObj.innerText=${_("Search Options")}+": [+]";
}
}
@@ -162,40 +163,40 @@
</script>
</head>
<body>
- <p id="heading"> Album art search </p>
+ <p id="heading"> ${_("Album art search")} </p>
<div id="info">
- <label> Artist: ${artist} </label><br/>
- <label> Album: ${album} </label>
+ <label> ${_("Artist")}: ${artist} </label><br/>
+ <label> ${_("Album")}: ${album} </label>
</div>
<hr/>
<div id="searchoptioncontainer">
<a href="#" onclick="toggleSelectOption(this); return false;">
- Search Options: [+]</a>
+ ${_("Search Options")}: [+]</a>
<div id="searchoption" style="display:none;">
- <label>Search Mode: </label>
+ <label>${_("Search Mode")}: </label>
<select id="searchmode" onchange="onOptionChange(this);">
- <option value="artist">Artist</option>
- <option value="album">Album</option>
- <option value="both" selected>Artist and album</option>
+ <option value="artist">${_("Artist")}</option>
+ <option value="album">${_("Album")}</option>
+ <option value="both" selected>${_("Artist and album")}</option>
</select>
<hr/>
- <label>Search text: </label>
+ <label>${_("Search text")}: </label>
<input type="text" id="searchtext" width="75%"/>
<button type="button" id="searchbutton"
- onclick="onSearchText();">Search</button>
+ onclick="onSearchText();">${_("Search")}</button>
<hr/>
<label>Image Size: </label>
<select id="imagesize" onchange="onOptionChange(this);">
- <option value="small">Small</option>
- <option value="medium">Medium</option>
- <option value="large" selected>Large</option>
- <option value="x-large">Extra Large</option>
+ <option value="small">${_("Small")}</option>
+ <option value="medium">${_("Medium")}</option>
+ <option value="large" selected>${_("Large")}</option>
+ <option value="x-large">${_("Extra Large")}</option>
</select>
</div>
</div>
<hr/>
- <div id="content">Loading...</div>
+ <div id="content">${_("Loading...")}</div>
<a id="more" href="#" onclick="moreResults(); return false;">
- Show more results</a>
+ ${_("Show more results")}</a>
</body>
</html>
@@ -6,6 +6,6 @@
<link rel="stylesheet" href="${stylesheet}" type="text/css" />
</head>
<body>
- <p id="heading"> Album art search - Select an album</p>
+ <p id="heading">${_(' Album art search - Select an album')}</p>
</body>
</html>

0 comments on commit 63672ae

Please sign in to comment.