Code Monkey home page Code Monkey logo

Comments (17)

rocboronat avatar rocboronat commented on June 23, 2024 1

This issue is a key one. Is what Phrase newcomers expects Phrase to do. Please, reopen it and accept #17. Thanks!

from phrase.

quinnjn avatar quinnjn commented on June 23, 2024

I'd like to expand this request further. Is there a reason why phrase doesn't allow uppercase characters, symbols, or numbers?

from phrase.

dlew avatar dlew commented on June 23, 2024

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.

quinnjn avatar quinnjn commented on June 23, 2024

@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.

Querschlag avatar Querschlag commented on June 23, 2024

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.

loganj avatar loganj commented on June 23, 2024

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.

ryust avatar ryust commented on June 23, 2024

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.

JakeWharton avatar JakeWharton commented on June 23, 2024

Nope. For libraries the question is always "why".

from phrase.

pforhan avatar pforhan commented on June 23, 2024

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.

pforhan avatar pforhan commented on June 23, 2024

Oh, #33 almost does this, test is a little weak though.

from phrase.

ryust avatar ryust commented on June 23, 2024

Ok, then I'll rephrase my question, "why lowercase"? Someone made a binary decision... could have been uppercase.

from phrase.

JakeWharton avatar JakeWharton commented on June 23, 2024

from phrase.

ryust avatar ryust commented on June 23, 2024

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.

JakeWharton avatar JakeWharton commented on June 23, 2024

from phrase.

dlew avatar dlew commented on June 23, 2024

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.

rocboronat avatar rocboronat commented on June 23, 2024

At least, improve the error message Unexpected character 'E'; expected key.

What about Unexpected character 'E'. Phrase keys must be lowercase.?

from phrase.

pforhan avatar pforhan commented on June 23, 2024

See #35 for a fix to the error messages for invalid key names.

from phrase.

Related Issues (16)

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.