Open mauriziofaleo opened 4 months ago
Hey! Thanks! Will look into that!
Thank you Jan for considering it! I'm available for any kind of questions you might have!
Another thing is the starting tag:
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
should only be
<resources>
for multiplatform
btw i would like this for android as well:
Positional arguments are exported for Android as %s without any indication of the argument number. For Compose Multiplatform, it should be %1$s, %2$s, etc. (source)
Hey! We will do following:
Remove the quoting logic for multiplatform files. Do I understand it correctly that there is no quoting logic for compose multiplatform resources?
Exactly, on Compose Multiplatform we don't need to escape '
and "
, so the logic needs to be removed.
Another note, for multiplatform html tags should not be encoded as well.
You could test it with AnnotatedString.fromHtml(htmlString)
, there's also no need to wrap with cdata which removes the need of this android flag for multiplatform (or compose in general when using this approach)
Another note, for multiplatform html tags should not be encoded as well. You could test it with
AnnotatedString.fromHtml(htmlString)
...
@Nailik Hi! Do you have some example files with this edge case? I'm trying to understand the difference. Thanks!
Feature request Strings for Compose Multiplatform need to be stored in an XML file encoded in a similar way to those used by Android, with some minor differences. For this reason, strings exported by Tolgee with the Android exporter are not immediately usable for mobile apps based on Compose Multiplatform and need some manual changes.
The only two differences I've identified are:
'
and"
should not be escaped. If escaped as Android requires, the\
will be visible to the user. This point has been discussed in the Compose Multiplatform repository here and here, and they provided a confirmation regarding the differences of the two formats.%s
without any indication of the argument number. For Compose Multiplatform, it should be%1$s
,%2$s
, etc. (source)Describe the solution you'd like I'd like to have a new export option called "Compose Multiplatform" which reuses the same implementation of the Android exporter, with the two differences I've mentioned before:
'
and"
.Describe alternatives you've considered The workaround I'm currently using is:
\'
and\"
with'
and"
before importing the XML into the codebase.Additional context If you want to know more about Compose Multiplatform resources, you can check the official doc.
Thank you!