Comments (7)
I don't have any plans, but I would certainly accept patches. If I did it myself I might even drop support for Py2 completely, since to me this was never really intended to be used as a library, but maybe then its a good thing to keep Py2 support as well.
from android2po.
I've added Python 3 support in my fork and have it running in Travis-CI to make sure it doesn't break.
from android2po.
Do you want to submit a PR?
from android2po.
This should be closed.
from android2po.
Hey, nice to see this evolve - I've just tried the latest master with python3.5 and I get an error due to colors:
Traceback (most recent call last):
File "/home/richq/src/android2po/scripts/a2po", line 3, in <module>
android2po.run()
File "/home/richq/src/android2po/android2po/program.py", line 227, in run
sys.exit(main(sys.argv) or 0)
File "/home/richq/src/android2po/android2po/program.py", line 217, in main
writer.finish()
File "/home/richq/src/android2po/android2po/utils.py", line 260, in finish
action.done('failed')
File "/home/richq/src/android2po/android2po/utils.py", line 165, in done
self.writer._print_action(self)
File "/home/richq/src/android2po/android2po/utils.py", line 297, in _print_action
self._print_action_header(action)
File "/home/richq/src/android2po/android2po/utils.py", line 323, in _print_action_header
self.stdout.write(colored("%*s" % (self.max_event_len, tag), attrs=['bold',], **style))
File "/usr/lib/python3.5/codecs.py", line 377, in write
self.stream.write(data)
TypeError: write() argument must be str, not bytes
Seems like the output to stdout is binary with the ANSI escape codes embedded, but stdout wants a string.
from android2po.
FWIW, this hack in utils.py Writer.__init__
makes things work - just write direct to stdout instead of wrapping it in a codec. My $LANG is en_US.utf8 by the way, nothing exotic.
# Create a codec writer wrapping stdout
#isatty = sys.stdout.isatty() \
# if hasattr(sys.stdout, 'isatty') else False
#self.stdout = codecs.getwriter(
# sys.stdout.encoding
# if isatty
# else locale.getpreferredencoding())(sys.stdout)
self.stdout = sys.stdout
from android2po.
I'm closing this. Let's address any problems with Python 3 support in a new pull request.
from android2po.
Related Issues (20)
- Babel-1.0dev isn't installable because "elsdoerfer.name" is down HOT 4
- crash on UTF-8 characters HOT 3
- Travis CI builds are not being built HOT 3
- a2po does not support ISO 639-2 language codes HOT 7
- KeyError: 'plural_form' HOT 1
- 'pip install android2po' is missing termcolor module
- [improvement] Add option to ignore strings that have the translatable="false" HOT 2
- android resource files with hyphens in filename
- line wrapping width system dependent HOT 3
- Locales: id, he, yi -> in, iw, ji HOT 4
- fy-NL is not a valid locale HOT 2
- Error on unicode character \u00A0 HOT 4
- Automate releases
- Don't mark formated strings as c-format HOT 7
- n/a
- Not emitting empty items in string-array HOT 1
- Cannot process <item>\?</item>
- [feature request] Support for iOS
- wrong issue
- Port to Python3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android2po.