Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml processor changing the names of strings can lead to conflicts #32

Open
dalewking opened this issue Nov 27, 2023 · 0 comments
Open
Labels
bug Something isn't working codegen: android-xml Codegen from Android String Resources conversion issue

Comments

@dalewking
Copy link

I tried running the XML processor on our strings and ended up getting a conflict where the generated code had variables with the same name. After some digging I discovered what the problem is.

In our string files we ended up having 2 strings that were named almost the same

    <string name="pending_label">PENDING</string>
    <string name="pendingLabel">PENDING</string>

Oddly enough in 1 language they even had different translations.

Because the XML processor converts all the names to camel case they ended up being mapped to the same name which produced duplicate items both with the name pendingLabel.

The processor should at least detect such a conflict and handle it more appropriately than generating code that does not compile.

@dalewking dalewking changed the title xml processor changes the names of strings can lead to conflicts xml processor changing the names of strings can lead to conflicts Nov 27, 2023
@DevNatan DevNatan added codegen: android-xml Codegen from Android String Resources conversion issue bug Something isn't working labels Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working codegen: android-xml Codegen from Android String Resources conversion issue
Projects
None yet
Development

No branches or pull requests

2 participants