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

Add support for multiple strings files #67

Merged
merged 6 commits into from
Oct 16, 2017

Conversation

mathebox
Copy link
Contributor

With this PR, it becomes possible to use multiple strings files in a project when using the --extract-loc-strings option. If a NSLocalizedString call specifies a specific table name, the key will be put in the according file.

For example, the usage of NSLocalizedString("key", tableName: "CustomName", comment: "...") will require a CustomName.strings file.

Because of this, a Localizable.strings file is no longer strictly required. Any other .string file will also work.

Fixes #20

Question:
StringsFilesSearch.findAllStringsFiles(within baseDirectoryPath: String, withFileName fileName: String) is currently not used. This method might helpful for future functionality. Should I remove this method anyway?

- Add check for string extraction.
- Add check for support via command line actor (currentyly failing).
@mathebox
Copy link
Contributor Author

Apparently, there is a problem. BartyCrouch tries to localize .strings files of storyboard files. I'll look into this.

@Jeehut
Copy link
Member

Jeehut commented Sep 26, 2017

Hi @mathebox, thank you for this PR. Did you succeed in fixing the issue?

Also, could you please update your commit messages to conform to the contribution guidelines? Mainly you need to remove the dot at the end of your commit messages.

@mathebox mathebox changed the title Add support for multiple strings files. Add support for multiple strings files Sep 26, 2017
@mathebox
Copy link
Contributor Author

Hi @Dschee. Yes, I fixed the problem. .strings files are going to be exclude if there is an storyboard or xib files with the same name.

Feel free to use 'merge & squash' for this pull request.

@Jeehut
Copy link
Member

Jeehut commented Oct 16, 2017

@mathebox Thank you for this PR, looks good to me and the tests seem to pass as well. Merging this.

@Jeehut Jeehut merged commit a31aef6 into FlineDev:stable Oct 16, 2017
@Jeehut
Copy link
Member

Jeehut commented Oct 16, 2017

Gonna wait a bit and see if #73 is finished soon and release in a few days at the latest.

@Jeehut
Copy link
Member

Jeehut commented Mar 8, 2018

Unfortunately your solution had unexpected side effects. See #11 for more details.

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

Successfully merging this pull request may close these issues.

None yet

2 participants