Comments (5)
@Jeehut I have attempted to fix this via #267. I tested against my limited setup, works as expected but I am not sure if I did not accidentally break anything else. swift test
passes.
from bartycrouch.
@mman Thank you for reporting this, being detailed and even providing a workaround. I think it makes sense to change the default behavior to work like what you expect to work like. I don't think it's related to the ../
prefixes (if they work at all, they should work correctly, and they seem to work for your). Instead, I just checked and found the function which holds the logic for updating the Strings files and found that this function has a for-loop right at the start spanning the entire function. So on each iteration, the resulting Strings file is created newly. Instead, all paths should be first walked through. All Strings files should be combined into one. Then, the rest of the logic should be run.
I don't currently have the time to implement this and it seems not to be urgent as you found a workaround. But if you're up to implementing this with a test that fails with the currnent behavior but passes with the changes, I'd happily review and merge.
from bartycrouch.
I have taken a quick look at the linked code, will see if I can come up with a failing test first and then fix the logic... it's like a low priority with existing workaround, but still would be nice get it working... bartycrouch
is helping me a lot and I do not see it disappear any time soon given where all the l18n stuff is going on Apple platforms...
from bartycrouch.
@Jeehut How do you swift build
and swift test
usually... On my swift 5.7 system the build/test fails:
€ swift test --disable-sandbox
Building for debugging...
/Users/mman/Developer/BartyCrouch/Tests/BartyCrouchTranslatorTests/Secrets/Secrets.swift:8:33: error: 'module' is inaccessible due to 'internal' protection level
let secretsFileUrl = Bundle.module.url(forResource: "secrets", withExtension: "json")
^~~~~~
/Users/mman/Developer/BartyCrouch/.build/x86_64-apple-macosx/debug/MungoHealer.build/DerivedSources/resource_bundle_accessor.swift:4:16: note: 'module' declared here
static let module: Bundle = {
^
[2/5] Compiling BartyCrouchTranslatorTests Secrets.swift
error: fatalError
from bartycrouch.
@mman The same command works for me, but the issue is that there's an asset file missing with secrets for testing machine translators. It's my fault, I hadn't documented it in the README, but I've just added the following to the "Contributing" section which should solve your problem:
In order for the tests to run build issues, you need to run – also add an an API key in the new file to run the translations tests, too:
cp Tests/BartyCrouchTranslatorTests/Secrets/secrets.json.sample Tests/BartyCrouchTranslatorTests/Secrets/secrets.json
Thanks for taking a look at this!
from bartycrouch.
Related Issues (20)
- Can't build project after upgrade bartycrouch to 4.8.0
- Explicit folders on the `codePaths` argument shouldn't be ignored later. HOT 5
- 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
- [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
- [Question/Bug] : .bartycrouch.toml permission errors on dependent test build HOT 7
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.