Comments (5)
Hm yes, so there actually exists an argument that makes the function in question include untranslated strings, but it's not used by default (and it would affect non-arrays as well). There is also a comment that I no longer understand.
I'll need to take a closer look. Using the default values for arrays generally seems easy enough to do, as long as the .po file contains the untranslated message. If the message is missing, i.e. the .po file is incomplete, then this is an impossible problem to solve right now, because the Import command would not have enough information (it doesn't know the maximum array length and does not look at the original file). Fortunately, that should rarely be the case.
At some point comments may possibly be used to encode additional information. This would solve a lot of these sorts of issues.
from android2po.
Second this - arrays that are of the wrong size cause nasty bugs with android apps - and prevent strings files from being usable after a2po is finished with them :(
from android2po.
I've started using lint --check InconsistentArrays
to make sure I don't have incomplete array translations... but lint has its own set of issues (it doesn't find all inconsistencies) and it would be better to fix at the source...
from android2po.
I'm not sure this was actually fixed. On 1.3.dev (latest git), when I try to import .po files with incomplete arrays, I have several problems: order is changed, and some incomplete arrays are still incomplete.
In my opinion, incomplete arrays should not at all be imported, or alternatively the missing strings should be replaced with the same string in the source language.
from android2po.
the missing strings should be replaced with the same string in the source language.
That's what it's supposed to do. Look at this test which is passing:
https://github.com/miracle2k/android2po/blob/master/tests/convert/test_string_arrays.py#L122
What is different in your case? I notice that in the test, both array items exist in the .po file, but one has no translations. There is no test for when one item has not occur in the .po file at all.
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.