angelolloqui / agi18n Goto Github PK
View Code? Open in Web Editor NEWUtility to easily localize your XIB/Storyboard files on iOS apps and extracting texts from code and XIB files into a Localizable strings
License: Other
Utility to easily localize your XIB/Storyboard files on iOS apps and extracting texts from code and XIB files into a Localizable strings
License: Other
// Execute genstrings appending results
puts "Executing genstrings -a -o #{dir} **/*.{h,m,mm}
"
source_files = Dir["*/.{h,m,mm}"]
genstrings -a -littleEndian -o #{dir} "#{source_files.join('" "')}"
.swift should be included, otherwise genstrings don't include the localisation for swift files..
//Execute genstrings appending results
puts "Executing genstrings -a -o #{dir} **/*.{h,m,mm, swift}
"
source_files = Dir["*/.{h,m,mm, .swift}"]
genstrings -a -littleEndian -o #{dir} "#{source_files.join('" "')}"
On my project, I'm using Google Plus framework, when I try to run agi18n it's giving the error:
"Executing /usr/local/bin/genxibstrings -a -o pt.lproj **/*.{xib,nib,storyboard}
/usr/local/bin/genxibstrings:48:in initialize': No such file or directory @ rb_sysopen - /var/folders/hy/xt0q9kh1247_cvwpkyq352hw0000gn/T/GPPMentionTableViewCell.nib.strings (Errno::ENOENT) from /usr/local/bin/genxibstrings:48:in
open'
from /usr/local/bin/genxibstrings:48:in block (2 levels) in <main>' from /usr/local/bin/genxibstrings:40:in
each'
from /usr/local/bin/genxibstrings:40:in block in <main>' from /usr/local/bin/genxibstrings:39:in
each'
from /usr/local/bin/genxibstrings:39:in `
If I remove the GooglePlus.bundle it's run as expected.
Nice piece of work!
Could you install it in Homebrew? That would make it easier to install command line tools than CocoaPods does.
I am not really sure when this started to happen, but suddenly even after +load
make the swizzle exchange, awakeFromNibCustom
never get's called, but the regular awakeFromNib
does.
I am using xcode 6.3.2 (6D2105) and iOS 8.3 SDK and I installed it using cocoapods (0.37.2).
I'm using zsh as my default shell. When I run either agi18n
or genxibstrings
command, it's always return error
$ agi18n
zsh: exec format error: agi18n
$ genxibstrings
zsh: exec format error: genxibstrings
Mac OS 10.10 dev preview 2, iTerm
Do you have idea how to fix this? Thanks!
Hi Iwas trying this with Xcode 6.4 and it won't alter the names of elements within storyboards.
Or am I doing something wrong?
Hi
The +(void)load; method does not get called when running on a device if the library is installed via cocoapods.
I believe the issues is the library is not included as a static library, see
Any ideas?
Oli
Hello, the license name in the readme file and the license text in the license file doesn't match. The license name in the Readme file is MIT License. However the license text in the license file seems to be the license text of BSD3-Clause.
Either the license name in the readme should be updated as
"BSD 3-Clause 'New' or 'Revised' License"
or the text in the License file should be updated as in the following link:
https://opensource.org/licenses/MIT
Your license text is same with the following BSD3 text:
https://spdx.org/licenses/BSD-3-Clause.html
We need this update in order to pass our corporate legal checks. Otherwise, we will not be able to use this beautiful library in our app.
Additionally, we are using a previous version (0.0.2) of the library. You cannot make changes in previous versions in Github. So, in the resolution of this issue could you please add a note like "this resolution also applies for previous versions"?
Thanks for your support.
I am unable to run this command.
thank you for your utility, but i find i can't localize strings in .mm and i need not localize strings in xib files. so, could you supply a version that we can set the configurations? thank you again
I am trying to call genxibstrings in a directory with a lot of .xib files in it. (I'm running it from the Project/Resources directory, since that's the directory that has all the xibs in it.)
When I do this, I get:
...$ genxibstrings
Output file: ./Localizable.strings
Input files: ["**/*.{xib,nib,storyboard}"]
Localizable.strings gets generated, but it's empty.
If I try and run ibtool directly on each of the xibs it does properly extract the values.
It seems to me that Input files should be an array of all the files and not the string "*/.{xib,nib,storyboard}".
I tried this with the default ruby installed (2) and I also installed ruby 1.9.2 (using rvm) and tried it that way too with the same results.
Any idea what's going on?
I have a problem now. I want to have multiple Strings files for translations.
The idea is to have a separate Strings file for each ViewController or XIB.
To make this works, I would need to send a correct TableName value when using NSLocalizedString method. Currently AGi18n just sends tableName = nil, so that it is only possible to use AGi18n in case all localizable strings are stored in Localizable.strings file.
In order to get this works I would need to override or customize the current AGi18n logic, so it is possible somehow to create relationship between element in storyboard / xib and its tableName
Do you have any suggestions? Or maybe you know some other libraries that allow to make it works in such way?
Hello, after the first run, the code changed to utf-16le, then the string file was given to the translator, the replacement engineering file was translated, and the operation app was perfect.
Then I wrote the new code, which needed to be translated again. I ran agi18n, and the incremental translation appeared to be messy.
I hope to get your help
I will not use a thing with a confusing name, because I will always have that confusion interrupting my flow, when using it. Please provide this at the beginning of the documentation, or just change the name to something that doesn't require an explanation.
I am trying to call genxibstrings in a directory with a lot of .xib files in it. (I'm running it from the Project/Resources directory, since that's the directory that has all the xibs in it.)
When I do this, I get:
...$ genxibstrings
Output file: ./Localizable.strings
Input files: ["**/*.{xib,nib,storyboard}"]
Localizable.strings gets generated, but it's empty.
If I try and run ibtool directly on each of the xibs it does properly extract the values.
It seems to me that Input files should be an array of all the files and not the string "*/.{xib,nib,storyboard}".
I tried this with the default ruby installed (2) and I also installed ruby 1.9.2 (using rvm) and tried it that way too with the same results.
Any idea what's going on?
After update to High Sierra.
I run agi18n script. it seems not work any more, just like I annotation # agi18n
in shell script.
It seems High Sierra change some terminal command ?
Environment:
not work in Xcode 9 && High Sierra.
work in Xcode9 && Sierra.
They should also be supported
Using Xcode 9 beta 6 to build my project (toolchain Swift Development Snapshot 2017-08-21), it stopped working. Text from the storyboards is no longer localized.
Ruby 2.0.0p481, XCode 6.3, OSX Yosemite 10.10.3
When I run "curl https://raw.github.com/angelolloqui/AGi18n/master/bin/install.sh | sh", empty transfer occurs. No messages in console. Nothing.
OK, downloaded manually 2 utils to /usr/local/bin/
Went to source code folder and executed "agi18n" - still nothing in console.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.