Closed kaicarver closed 8 years ago
I boldly tried to fix the problem, but probably did it wrong: forked, branched, made correction, then was asked to install commitizen in order to be able to commit, ran cz, gave a lot of comment info, ... and then I'm not sure what happened, had to control-C out of cz, not very zen-like experience.
Anyway it was a one-line change in arrayify()
, here it is:
lib/extract.js, line 187:
< return [unknown]
> return unknown.split(',');
Hey @kaicarver – thanks for opening the issue. I'd love to accept a pull request if you want to take another swing at it! I'm betting the tests failed when you tried to commit. You can run the gulp
task to watch and test as you're building, see: https://github.com/bitjson/s18n#contributing
I'll also try to look into this a little later.
OK maybe I'll try again some time. But honestly I am beginning to wonder if this module, though it looks very nice, is usable for me, because I keep running into very basic stuff that doesn't work at all (I'll post one more issue). Maybe it's just the CLI that doesn't work well and that no one uses, and the library works well?
Hey @kaicarver – this CLI is definitely lacking. By far the most used interface for s18n is gulp-l10n, if you'd prefer something more stable. While s18n's javascript API has 100% test coverage, the CLI is not tested by the build. The gulp plugin, however, has 100% test coverage over the entire interface, so you shouldn't encounter any issues over there.
That being said, I'm planning to take another pass of s18n's CLI in the next few days, so hopefully I can clean it up a bit, maybe even add the CLI to test coverage (#2) so it can't rot so easily.
Thanks for posting the issues you're finding!
thanks for the tip, I will try using s18n via gulp-l10n. My initial goal was to do a super-quick-and-dirty localization, so I'll try to keep doing that, and maybe make some bugfix or feature contributions later.
Hey @kaicarver – is this solved now by #11? Thanks for the PR!
It should be! No time to make an automated test, but it did fix it on my local version from a few casual tests. On Apr 21, 2016 23:20, "Jason Dreyzehner" notifications@github.com wrote:
Hey @kaicarver https://github.com/kaicarver – is this solved now by #11 https://github.com/bitjson/s18n/pull/11? Thanks for the PR!
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/bitjson/s18n/issues/8#issuecomment-212969293
Great, thanks! I'll close this for now, and I'll try to write some good test cases soon.
Specifying elements via the command line parameter
-e
and-a
does not work with multiple elements or attributes.Documentation says default elements are
title,p,h1,h2,h3,h4,h5,h6
but specifying them via-e
seems to be like asking to localize no elements, returning strings only for thealt
attribute, see output below.It looks like the problem is with the comma separator, because specifying a single element or attribute works as expected.
For reference, HTML file is here: https://github.com/taipeihackerspace/web/blob/master/index.html