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

String resource mapping web 1.6.10-rc03 #4837

Open
mallumoSK opened this issue May 19, 2024 · 1 comment
Open

String resource mapping web 1.6.10-rc03 #4837

mallumoSK opened this issue May 19, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request resources

Comments

@mallumoSK
Copy link

mallumoSK commented May 19, 2024

Hi i have little problem with string resources mapping on web target.
Previous version reads strings directly from "strings.xml" but now is from "strings.commonMain.cvr"
That is ok + good idea
But:
In ours project are translations edited -> generated -> stored in runtime.
Problems are in string reader.
Every resource (generated by compose plugin) contains reference to translations by org.jetbrains.compose.resources.ResourceItem
constructor contains parameters:

    internal val offset: Long,
    internal val size: Long,

I understand why ... because of speed,
but when are resources generated again (on the server) strings have different size and fallowing offset too.

Compiling whole project over and over again is not good idea,
currently i rewrite parser without offsets, but pernament version inside library will helps

@terrakok
Copy link
Collaborator

Hi @mallumoSK ! Thank you for the feedback, I understand your case but I guess we won't change it it the near future. I may suggest you a workaround: to wrap your string resources to the independent library module and to make resource's acessors public. You can build and publish the library after strings changes directly on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request resources
Projects
None yet
Development

No branches or pull requests

3 participants