replace gettext and intltool with Babel
This commit is contained in:
parent
51cf811561
commit
bd9c7691eb
|
@ -19,8 +19,3 @@ remotinatorc
|
||||||
terminatorlib/meliae
|
terminatorlib/meliae
|
||||||
/dist
|
/dist
|
||||||
/MANIFEST
|
/MANIFEST
|
||||||
|
|
||||||
## language / intltool related files
|
|
||||||
.intltool*
|
|
||||||
data/terminator.appdata.xml
|
|
||||||
data/terminator.desktop
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
[python: **.py]
|
||||||
|
[python: terminator]
|
||||||
|
[python: remotinator]
|
||||||
|
[glade: **.glade]
|
||||||
|
[glade: data/terminator.metadata.xml]
|
||||||
|
[desktop: **.desktop]
|
||||||
|
|
|
@ -4,45 +4,45 @@
|
||||||
<id>terminator.desktop</id>
|
<id>terminator.desktop</id>
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>GPL-2.0 only</project_license>
|
<project_license>GPL-2.0 only</project_license>
|
||||||
<_name>Terminator</_name>
|
<name translatable="yes">Terminator</name>
|
||||||
<_summary>Multiple terminals in one window</_summary>
|
<summary translatable="yes">Multiple terminals in one window</summary>
|
||||||
<description>
|
<description>
|
||||||
<_p>
|
<p translatable="yes">
|
||||||
The robot future of terminals
|
The robot future of terminals
|
||||||
</_p>
|
</p>
|
||||||
<_p>
|
<p translatable="yes">
|
||||||
A power-user tool for arranging terminals. It is inspired by programs such as
|
A power-user tool for arranging terminals. It is inspired by programs such as
|
||||||
gnome-multi-term, quadkonsole, etc. in that the main focus is arranging terminals
|
gnome-multi-term, quadkonsole, etc. in that the main focus is arranging terminals
|
||||||
in grids (tabs is the most common default method, which Terminator also supports).
|
in grids (tabs is the most common default method, which Terminator also supports).
|
||||||
</_p>
|
</p>
|
||||||
<_p>
|
<p translatable="yes">
|
||||||
Much of the behavior of Terminator is based on GNOME Terminal, and we are adding
|
Much of the behavior of Terminator is based on GNOME Terminal, and we are adding
|
||||||
more features from that as time goes by, but we also want to extend out in different
|
more features from that as time goes by, but we also want to extend out in different
|
||||||
directions with useful features for sysadmins and other users.
|
directions with useful features for sysadmins and other users.
|
||||||
</_p>
|
</p>
|
||||||
<_p>Some highlights:</_p>
|
<p translatable="yes">Some highlights:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<_li>Arrange terminals in a grid</_li>
|
<li translatable="yes">Arrange terminals in a grid</li>
|
||||||
<_li>Tabs</_li>
|
<li translatable="yes">Tabs</li>
|
||||||
<_li>Drag and drop re-ordering of terminals</_li>
|
<li translatable="yes">Drag and drop re-ordering of terminals</li>
|
||||||
<_li>Lots of keyboard shortcuts</_li>
|
<li translatable="yes">Lots of keyboard shortcuts</li>
|
||||||
<_li>Save multiple layouts and profiles via GUI preferences editor</_li>
|
<li translatable="yes">Save multiple layouts and profiles via GUI preferences editor</li>
|
||||||
<_li>Simultaneous typing to arbitrary groups of terminals</_li>
|
<li translatable="yes">Simultaneous typing to arbitrary groups of terminals</li>
|
||||||
</ul>
|
</ul>
|
||||||
<_p>And lots more...</_p>
|
<p translatable="yes">And lots more...</p>
|
||||||
</description>
|
</description>
|
||||||
<screenshots>
|
<screenshots>
|
||||||
<screenshot type="default">
|
<screenshot type="default">
|
||||||
<image>http://4.bp.blogspot.com/-xt4Tja1TMQ0/Vdemmf8wYSI/AAAAAAAAA9A/uROTre0PMls/s1600/terminator_main_basic.png</image>
|
<image>http://4.bp.blogspot.com/-xt4Tja1TMQ0/Vdemmf8wYSI/AAAAAAAAA9A/uROTre0PMls/s1600/terminator_main_basic.png</image>
|
||||||
<_caption>The main window showing the application in action</_caption>
|
<caption translatable="yes">The main window showing the application in action</caption>
|
||||||
</screenshot>
|
</screenshot>
|
||||||
<screenshot>
|
<screenshot>
|
||||||
<image>http://4.bp.blogspot.com/-rRxALSpEEZw/Vdeu58JgpnI/AAAAAAAAA9o/XewWKJ5HNo4/s1600/terminator_main_complex.png</image>
|
<image>http://4.bp.blogspot.com/-rRxALSpEEZw/Vdeu58JgpnI/AAAAAAAAA9o/XewWKJ5HNo4/s1600/terminator_main_complex.png</image>
|
||||||
<_caption>Getting a little crazy with the terminals</_caption>
|
<caption translatable="yes">Getting a little crazy with the terminals</caption>
|
||||||
</screenshot>
|
</screenshot>
|
||||||
<screenshot>
|
<screenshot>
|
||||||
<image>http://2.bp.blogspot.com/-t_8oRyMXUls/VdemmRVnZnI/AAAAAAAAA88/rHIr8L1X7Ho/s1600/terminator_prefs_global.png</image>
|
<image>http://2.bp.blogspot.com/-t_8oRyMXUls/VdemmRVnZnI/AAAAAAAAA88/rHIr8L1X7Ho/s1600/terminatorp translatable="yes"refs_global.png</image>
|
||||||
<_caption>The preferences window where you can change the defaults</_caption>
|
<caption translatable="yes">The preferences window where you can change the defaults</caption>
|
||||||
</screenshot>
|
</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
<url type="homepage">https://github.com/gnome-terminator/terminator</url>
|
<url type="homepage">https://github.com/gnome-terminator/terminator</url>
|
||||||
|
|
13
po/genpot.sh
13
po/genpot.sh
|
@ -1,11 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Stupid workaround for intltools not handling extensionless files
|
cd ..
|
||||||
ln -s terminator ../terminator.py
|
python setup.py extract_messages
|
||||||
ln -s remotinator ../remotinator.py
|
cd po
|
||||||
|
|
||||||
# Make translation files
|
|
||||||
intltool-update -g terminator -o terminator.pot -p
|
|
||||||
|
|
||||||
# Cleanup after stupid workaround
|
|
||||||
rm ../terminator.py
|
|
||||||
rm ../remotinator.py
|
|
||||||
|
|
1776
po/terminator.pot
1776
po/terminator.pot
File diff suppressed because it is too large
Load Diff
|
@ -1,2 +1,7 @@
|
||||||
[aliases]
|
[aliases]
|
||||||
test=pytest
|
test=pytest
|
||||||
|
|
||||||
|
[extract_messages]
|
||||||
|
mapping_file = babel.cfg
|
||||||
|
output_file = po/terminator.pot
|
||||||
|
input_dirs = .
|
||||||
|
|
38
setup.py
38
setup.py
|
@ -56,36 +56,12 @@ class BuildData(build):
|
||||||
|
|
||||||
if newer(po, mo):
|
if newer(po, mo):
|
||||||
info('compiling %s -> %s' % (po, mo))
|
info('compiling %s -> %s' % (po, mo))
|
||||||
try:
|
from babel.messages.frontend import compile_catalog
|
||||||
rc = subprocess.call(['msgfmt', '-o', mo, po])
|
compiler = compile_catalog(self.distribution)
|
||||||
if rc != 0:
|
compiler.domain = ['terminator']
|
||||||
raise Warning("msgfmt returned %d" % rc)
|
compiler.input_file = po
|
||||||
except Exception as e:
|
compiler.output_file = mo
|
||||||
error("Building gettext files failed. Ensure you have gettext installed. Alternatively, try setup.py --without-gettext [build|install]")
|
compiler.run()
|
||||||
error("Error: %s" % str(e))
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
TOP_BUILDDIR='.'
|
|
||||||
INTLTOOL_MERGE='intltool-merge'
|
|
||||||
desktop_in='data/terminator.desktop.in'
|
|
||||||
desktop_data='data/terminator.desktop'
|
|
||||||
rc = os.system ("C_ALL=C " + INTLTOOL_MERGE + " -d -u -c " + TOP_BUILDDIR +
|
|
||||||
"/po/.intltool-merge-cache " + TOP_BUILDDIR + "/po " +
|
|
||||||
desktop_in + " " + desktop_data)
|
|
||||||
if rc != 0:
|
|
||||||
# run the desktop_in through a command to strip the "_" characters
|
|
||||||
with open(desktop_in) as file_in, open(desktop_data, 'w') as file_data:
|
|
||||||
[file_data.write(line.lstrip('_')) for line in file_in]
|
|
||||||
|
|
||||||
appdata_in='data/terminator.appdata.xml.in'
|
|
||||||
appdata_data='data/terminator.metainfo.xml'
|
|
||||||
rc = os.system ("C_ALL=C " + INTLTOOL_MERGE + " -x -u -c " + TOP_BUILDDIR +
|
|
||||||
"/po/.intltool-merge-cache " + TOP_BUILDDIR + "/po " +
|
|
||||||
appdata_in + " " + appdata_data)
|
|
||||||
if rc != 0:
|
|
||||||
# run the appdata_in through a command to strip the "_" characters
|
|
||||||
with open(appdata_in) as file_in, open(appdata_data, 'w') as file_data:
|
|
||||||
[file_data.write(line.replace('<_','<').replace('</_','</')) for line in file_in]
|
|
||||||
|
|
||||||
class Uninstall(Command):
|
class Uninstall(Command):
|
||||||
description = "Attempt an uninstall from an install --record file"
|
description = "Attempt an uninstall from an install --record file"
|
||||||
|
@ -229,6 +205,8 @@ setup(name=APP_NAME,
|
||||||
],
|
],
|
||||||
setup_requires=[
|
setup_requires=[
|
||||||
'pytest-runner',
|
'pytest-runner',
|
||||||
|
'babel',
|
||||||
|
'BabelGladeExtractor',
|
||||||
],
|
],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'pycairo',
|
'pycairo',
|
||||||
|
|
Loading…
Reference in New Issue