Giter Club home page Giter Club logo

Comments (7)

miracle2k avatar miracle2k commented on July 17, 2024

Python 2.5 is currently not supported. I have to see whether that is something that's possible without too much work.

from android2po.

andrewpmoore avatar andrewpmoore commented on July 17, 2024

Thanks for the info. I'm now trying to run it under 2.4 by editing the /usr/bin/a2po to call python2.4 instead of python as both are installed on my box.

Now I'm getting the below. I'm a java dev, but python is something I've no idea about, so apologies if these are obvious issues!

a2po
Traceback (most recent call last):
File "/usr/bin/a2po", line 7, in ?
sys.exit(
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 277, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2179, in load_entry_point
return ep.load()
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1912, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.4/site-packages/android2po-1.1.0-py2.4.egg/android2po/init.py", line 4, in ?
from convert import *
File "/usr/lib/python2.4/site-packages/android2po-1.1.0-py2.4.egg/android2po/convert.py", line 258
original_strings = file if isinstance(file, dict) else read_xml(file, warnfunc)
^
SyntaxError: invalid syntax

from android2po.

miracle2k avatar miracle2k commented on July 17, 2024

Well, I meant of course that Python 2.5 and below are not supported. Syntax elements are used that have been added later on (note that Python 3.x is a separate beast, and something like 2.5 and later, for most Python programs, means >= 2.5 and < 3)

It sounds like you might be running on some kind of older LTS release that doesn't have 2.6 or 2.7, in which case you might try to compile your own. Maybe have a look at https://github.com/utahta/pythonbrew which should make this even easier than it is normally.

from android2po.

miracle2k avatar miracle2k commented on July 17, 2024

Also, make sure to install android2po separately for each Python version; simply editing the shebang of /usr/bin/a2po is probably not going to work.

If you don't have an easy_install for a particular Python version to use, you can always download a package and then do:

 $ /my/python/binary setup.py install

manually, do install for that particular runtime.

from android2po.

andrewpmoore avatar andrewpmoore commented on July 17, 2024

Thanks for your help on this. I've now got 2.7 working and the app seems to work as it's created the .po files.
One final question probably unrelated to android2po.
I get the .po files and I know the location my Pootle install has it's "po" directory, but I'm not sure where the files go.

e.g. my project directory is "test" and pootle is running from
/vol/translate/Pootle-2.1.6/

so I have a /vol/translate/Pootle-2.1.6/po/test directory with a collection of directories under that for each language (e.g. fr, de etc)
If tried putting the generated .po files into /vol/translate/Pootle-2.1.6/po/test or for example the french po files into /vol/translate/Pootle-2.1.6/po/test/fr but they don't seem to show up.
Apologies for all the questions and thanks for your support.

from android2po.

miracle2k avatar miracle2k commented on July 17, 2024

I only remember having a lot of trouble setting up Pootle as well. My installation is as follows:

/opt/pootle/data/po/projectName/fr/android.po

I remember always having to create the languages in Pootle manually, and then use a "scan for files" button somewhere to make Pootle realize there were .po files in the filesystem.

from android2po.

andrewpmoore avatar andrewpmoore commented on July 17, 2024

Thanks for that. With your help I've managed to get everything working. Great tools by the way, very useful!

from android2po.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.