Comments (9)
Ha indeed I forgot to expand the ~
in the path. You can fix it by adding
some stringByExpandingTildeInPath
in Sources/L10n/main.swift …
or use a path that doesn't contain ~ in the meantime
from swiftgen.
Thanks!
from swiftgen.
Reopening so I don't forget to add that stringByExpandingTildeInPath
call in future versions.
from swiftgen.
Hi,
I'm also getting this issue, except that my path doesn't contain a tilde:
swiftgen-l10n Localizable.strings
// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen
import Foundation
// No line found in Localizable.strings
Do you have any idea what could go wrong? (I'm using brew's version (0.4.4))
from swiftgen.
The comment may actually be a bit misleading (I should change it one day) and is generated when there would not be any "case" generated, which could happen indeed if your Localizable.strings is empty, but also if the file is not found (because you mistyped the path or the relative path was not relative to what you thought maybe?), or if the file wasn't readable at all (access rights etc), …
I should probably generate a more explicit comment (or even generate a proper error / exit code maybe) to tell whether it's a "file not found" or "error reading file" or "no problem when reading file but no string found in it" etc.
from swiftgen.
That's strange:
# swiftgen-l10n Localizable.strin
Error: The file “Localizable.strin” couldn’t be opened because there is no such file.
# ls -l
total 16
-rw-r--r-- 1 kevindelannoy staff 244 Sep 26 15:43 InfoPlist.strings
-rw-r--r--@ 1 kevindelannoy staff 3062 Sep 30 20:30 Localizable.strings
# swiftgen-l10n Localizable.strings
// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen
import Foundation
// No line found in Localizable.strings
I also tried to type in absolute path but I have the same result.
Also, Localisable.strings just contains "test" = "Test123";
from swiftgen.
Ah, very strange indeed. Is your Localizable.strings
properly saved as a UTF-16 file, not an UTF-8 file? (as that's how Localizable.strings files are expected to be encoded by Xcode anyway)
(Note for self: add better error messages, including for cases where the was couldn't be read because of a bad encoding)
from swiftgen.
Yup, that was encoding!
Thanks @AliSoftware 👍
from swiftgen.
Closing as I opened dedicated issues for the UTF8 encoding problem (#21) and the tilde not expanded (#22)
from swiftgen.
Related Issues (20)
- Unprintable ASCII character found in Swift Source Code HOT 1
- SVG images being ignored in assets HOT 1
- The SwiftGen configuration automatically substitutes fileprivate in the initialization of ColorAsset HOT 1
- Adding Extra parameter when running SwiftGen through Xcode HOT 1
- Error: `swiftgen.yml` is not a config file HOT 4
- String template is not able to generate a function with a string parameter and a plural int HOT 2
- Make `SwiftUI` types the default and not `UIKit` types. HOT 1
- Color Generated with SwiftUI HOT 2
- disable Font typealias? HOT 1
- Addition of .string file changes all previous strings usage HOT 1
- Ability to change Locale HOT 6
- Feature Request: Public access to either the fallback string or the ability to specify locale HOT 2
- Add ability to refer file name of JSON HOT 3
- Support for visionOS HOT 2
- Is this repo deprecated? HOT 4
- Add an XcodeBuiltToolPlugin for swiftgen HOT 5
- [Homebrew] Error: swiftgen has been disabled because it does not build! HOT 10
- Apple privacy manifest support HOT 2
- SwiftGen Errors on Swift 6 HOT 10
- Subsequent builds after first build always fail
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 swiftgen.