Comments (17)
This issue is a key one. Is what Phrase newcomers expects Phrase to do. Please, reopen it and accept #17. Thanks!
from phrase.
I'd like to expand this request further. Is there a reason why phrase doesn't allow uppercase characters, symbols, or numbers?
from phrase.
It seems like it ought to accept any value that is valid as an Android resource.
I'm willing to do a PR on this but I'm curious if there is a reason it was purposefully avoided before I jump in.
from phrase.
@dlew ditto. I have something in the works but I've been waiting for input on this issue. Their exists a test case stating no uppercase characters so I'd like some feedback on why.
from phrase.
If that's an expected behaviour I suggest to include this in the documentation. I struggled quiet a while to track down the cause of error java.lang.IllegalArgumentException: Missing closing brace: }
...
from phrase.
We don't support uppercase characters because we haven't seen a need. If anything we could ignore case, but why?
Closing, feel free to reopen if you're still interested and care to make the case.
Sorry for the pun.
from phrase.
Just because you don't see a need doesn't mean there isn't one. I have a use case of migrating from a different substitution library that used uppercase for their keys and I can't have all my users manually translating their uppercase parameters to lowercase. I've made the case.
The bigger question is instead of "why", is "why not"?
from phrase.
Nope. For libraries the question is always "why".
from phrase.
I think there's a very good case for fixing the terrible error message. When that's done I think this will matter less to folks as they'll get immediate feedback on the problem, and won't have to dig.
I'll see if I can put a pull request together, I just ran into this last week.
from phrase.
Oh, #33 almost does this, test is a little weak though.
from phrase.
Ok, then I'll rephrase my question, "why lowercase"? Someone made a binary decision... could have been uppercase.
from phrase.
from phrase.
The Android standard for constants seems to be uppercase in most of the projects I've seen. Parameterized strings with uppercase keys would also be much easier to identify... so in another time and place the uppercase decision could have as easily been justified by someone else.
Not trying to give you a hard time, and actually I don't care as I've moved on to different software, but the polarized right/wrong views just irk me.
from phrase.
from phrase.
actually I don't care as I've moved on to different software
If it doesn't matter to you, then maybe you shouldn't be taking up other peoples' time and effort with the matter? Maintaining a library is a chore, there's no need to make it harder than it already is.
from phrase.
At least, improve the error message Unexpected character 'E'; expected key.
What about Unexpected character 'E'. Phrase keys must be lowercase.
?
from phrase.
See #35 for a fix to the error messages for invalid key names.
from phrase.
Related Issues (16)
- Support for colors HOT 1
- Support for plurals HOT 17
- No tags pushed for 1.1.0 release on gh HOT 1
- Proposal: Interceptor API
- Got exception: IllegalArgumentException: Missing closing brace: } HOT 5
- about 'orderBy' IllegalArgumentException HOT 1
- Support Spannable for ListPhrase HOT 1
- camelCase keys throw exception: IllegalArgumentException: Missing closing brace: }
- Numbers in keys throw exception: IllegalArgumentException: Missing closing brace: }
- Add support to custom prefix and suffix HOT 1
- Can we expect updates in the near future? HOT 1
- Correct description HOT 1
- Phrase.put(String, int) HOT 1
- AnnotatedString support HOT 1
- support deferred resource binding HOT 2
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 phrase.