Skip to content

Add support for multiple strings files#67

Merged
Jeehut merged 6 commits intoFlineDev:stablefrom
mathebox:multi-table-support
Oct 16, 2017
Merged

Add support for multiple strings files#67
Jeehut merged 6 commits intoFlineDev:stablefrom
mathebox:multi-table-support

Conversation

@mathebox
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@Jeehut
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants