-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
feat: Apple String Catalog Support #2893
base: main
Are you sure you want to change the base?
Conversation
@JanCizmar Hi, this is ready to be reviewed |
Impressive job! I am reviewing it now. |
Will look into it, thanks! |
@Test | ||
fun `returns correct parsed result`() { | ||
processFile() | ||
mockUtil.fileProcessorContext.assertLanguagesCount(2) // en, fr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see that by default it converts %@
and %lld
parameters into the Tolgee Universal ICU format by default. Please add such params to the example files and test them.
.assertSinglePlural { | ||
hasText( | ||
""" | ||
{value, plural, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we also need to test what happens when there is some ICU syntax by any chance in the string. Such syntax has to be escaped.
This is tested here:
io.tolgee.unit.formats.apple.in.StringsdictFormatProcessorTest#import with placeholder conversion (disabled ICU)
backend/data/src/main/kotlin/io/tolgee/service/export/ExportFilePathProvider.kt
Outdated
Show resolved
Hide resolved
backend/data/src/main/kotlin/io/tolgee/service/dataImport/processors/FileProcessorContext.kt
Outdated
Show resolved
Hide resolved
It also looks like the exported json is not formatted. |
@ftp27 I believe you are using it wrong. You have to enable the conversion to Tolgee ICU placeholders when importing or you need to disable ICU support on the project configuration level. It seems like you have the ICU support enabled, but you turned off the conversion when importing. This leads to escaped More context here: https://docs.tolgee.io/platform/formats/apple_strings |
I have prepared PR to docs and CLI: |
backend/data/src/main/kotlin/io/tolgee/service/dataImport/processors/FileProcessorContext.kt
Outdated
Show resolved
Hide resolved
backend/data/src/main/kotlin/io/tolgee/service/export/ExportFilePathProvider.kt
Outdated
Show resolved
Hide resolved
To make ktlint pass, you need to run |
@JanCizmar Sorry about that, pushed new changes. |
This PR adds support for Apple String Catalog Support
demo
a.mp4
/claim #2300
/closes #2300