Comments (5)
@tladesignz Thank you very much for reporting this. We have a similar issue with InfoPlist.strings
files getting ignored due to fixed constants that can't be configured to not be ignored via the configuration file. I plan to introduce configuration options for all fixed strings, I can also do that for Pods
files so you can override ignoring the entire Pods
folder and instead specify your own to ignore. The new config options will have to default to the current values though so there's no break in the behavior.
If what you want is something different and you actually want to change the behavior of codePaths
, feel free to post a PR with your exact suggestion though and I will have a look, I'm open to merge that, too. I'm just not sure if I will have the time to implement it (I'm not sure if it's an easy fix or needs some logic refactoring).
from bartycrouch.
Making the ignore list configurable certainly would give a tool to fix my problem.
However, I would still consider the usage counter-intuitive: Even though, I explicitly add a certain folder to get scanned, it gets ignored by default, because one of its parent folders matches the default ignore-list.
As already stated: The ignore-list should only be applied to automatically found sub-folders of given codePaths
folders.
I understand that changing that behaviour might break a very small fraction of configurations. However I'd argue, that these were done in error and never fixed because the current implementation hides the problem. There's no situation I can imagine where it does make any sense to add a folder to the codePaths
which gets ignored completely, anyway.
This change will be easily spotted and can be easily fixed in such a faulty configuration. After a BartyCrouch updated, your localization source file will contain a whole lot of new strings you didn't expect. Fix: remove the unwanted codePaths
folder. Re-build. Done.
So, actually one can argue, that the proposed change in the behaviour of BartyCrouch doesn't break configurations, but finally helps users to spot faulty configurations. That's actually wanted.
I'll contribute a change after my vacation. Happy new year!
from bartycrouch.
@tladesignz I think you got me wrong, I never said that I think your suggestion doesn't make sense or would break things for users, sorry that I wasn't more explicit: I do agree with your assessment that an explicit mention of a (sub)path in the codePaths
should not be ignored by global ignores. The global ignores should only happen for subpaths if anything. I'm just not sure if that's easy to implement or not and since I'm planning a larger rewrite anyways, it's not worth fixing for me before that. But feel free to give it a try.
from bartycrouch.
Was actually quite easy to fix. Hope that helps!
from bartycrouch.
Thank you @tladesignz!
from bartycrouch.
Related Issues (20)
- Xcode 13: Could not find 'SupportedLanguage' enum within 'BartyCrouch' enum within path HOT 3
- Can't build project after upgrade bartycrouch to 4.8.0
- NSLocationTemporaryUsageDescriptionDictionary translations gets removed HOT 6
- Cocoapods executable doesn't work on x86 machines HOT 19
- Embed lib_InternalSwiftSyntaxParser.dylib into package HOT 3
- error: the target 'SwiftSyntax' in product 'SwiftSyntax' contains unsafe build flags HOT 4
- Support for none default Xcode install path HOT 1
- Add new line on every translation after normalize HOT 2
- Translate successful but no output for Storyboards Main.string file HOT 3
- BartyCrouch with SwiftGen creates empty string values HOT 2
- [Feat] Autogenerate `.strings` files HOT 3
- `overrideComments` option doesn't work HOT 4
- [Bug] CI failed for version 4.12.0 HOT 2
- [Bug] update.code with additive=false and code in multiple parent directories looses strings HOT 5
- [Feat] Tip: How to localize LocalizedStringResource types with bartycrouch HOT 3
- [Feat] Support for modular application HOT 4
- [Bug] Translation Microya.ApiError<Microya.EmptyBodyResponse> error 3 HOT 2
- [Bug] PodSpec does not support iOS anymore HOT 7
- [Feat] Extract localizable Strings from SwiftUI Text HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bartycrouch.