Skip to content

Added support for .strings and .stringsdict files#215

Closed
fhasse95 wants to merge 5 commits intoskiptools:mainfrom
fhasse95:Enhanced-Localized-Strings-Support
Closed

Added support for .strings and .stringsdict files#215
fhasse95 wants to merge 5 commits intoskiptools:mainfrom
fhasse95:Enhanced-Localized-Strings-Support

Conversation

@fhasse95
Copy link

This PR improves support for localized strings by also copying the *.strings and *.stringsdict files to the resources.

This is particularly useful for projects that haven’t yet adopted to the *.xcstrings format. For instance, I still prefer using the *.lproj structure for open-source repositories as they are much easier to review in Git diffs and allow contributors to assist with translations without needing specialized tools or dealing with the complex JSON structure of *.xcstrings.

During the adjustment, the following question also came into my mind:
As I’ve noticed, the plural variants from the *.xcstrings files are already converted internally into *.stringsdict files. However, according to the documentation, these are currently not supported. Is this still planned, or is it technically not possible? I’ve already looked into the Skip Foundation to see how the mapping of localized strings currently works, but I haven’t found a solution on how to support it yet. But maybe I just don't have the necessary background knowledge.

Looking forward to your response! 😊


Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Please review the contribution guide at https://skip.dev/docs/contributing/ for advice and guidance on making high-quality PRs.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

@cla-bot cla-bot bot added the cla-signed label Mar 13, 2026
@marcprux
Copy link
Member

We should have already been copying raw Localized.strings files when they are found. At least, we used to before we updated to handle the .xcstrings processing (in 3a2887c and 43a9b87), but I admit it has not been tested in a while.

As you suspect, though, we don't yet have any support for handing pluralizations, so we don't actually do anything with the generated .stringsdict files. We handle all the localization manually at runtime (in skip-foundation's Bundle), so we'd need to implement support for pluralization, which is unfortunately quite complex. We might be able to leverage android.icu.text.PluralRules to help with this.

It would be a fantastic feature to have, but I've never had enough time to work on it. If you're interested in diving deeper, it would make a great contribution!

@fhasse95
Copy link
Author

Hi @marcprux,

Thanks a lot for the quick feedback! You’re absolutely right. It turns out I had an error in my own package configuration where the localized strings were located. After switching back from my local skipstone plugin to the official 1.7.7 release, I can confirm that the *.strings files are indeed being copied correctly. Therefore I'll close this PR.

Regarding the pluralization support: Thank you so much for the detailed context! It sounds indeed quite challenging but I’ll definitely dive deeper into this and look into how android.icu.text.PluralRules could be used to achieve this once I find the time. For now, at least, you’ve given me some good starting points to work with.

Best regards,
Fabian

@fhasse95 fhasse95 closed this Mar 13, 2026
@fhasse95 fhasse95 deleted the Enhanced-Localized-Strings-Support branch March 13, 2026 19:04
@marcprux
Copy link
Member

Closed in favor of skiptools/skip-foundation#102, I presume.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants