felixzapata / gulp-i18n-pug

Gulp plugin to compile Pug templates with internationalization support based on JS/JSON/YAML files
MIT License
28 stars 4 forks source link

Locale name return blank #1

Closed leandromatos closed 7 years ago

leandromatos commented 7 years ago

In example in readme, #{$localeName} return blank.

body
  h1 #{$i18n.hello.world}!
  p Using locale #{$localeName}

How to get name of locale in file?

felixzapata commented 7 years ago

hi @leandromatos , I will take a look as soon as possible.

felixzapata commented 7 years ago

@leandromatos I've updated the plugin to fix this issue. The readme file had the example but was not in the plugin. Now, the localeName will be returned to the template if there are locales files.

leandromatos commented 7 years ago

Thanks @felixzapata ;)

felixzapata commented 7 years ago

hi @leandromatos, is it ok?

leandromatos commented 7 years ago

Yes, but I used NPM for install package, only after I saw that the package I installed is from someone else and has the same name, however, this package not returns localeName =(

leandromatos commented 7 years ago

@felixzapata, Why do not you put your package in NPM? Even if you have to rename it, it's much easier to use on projects.

felixzapata commented 7 years ago

hi @leandromatos , I started this plugin three years (to create the Gulp version of the Grunt version) ago without finished it. Finally, last year I resumed the plugin and when I had something to publish I discovered the other and I thought myself: "well, maybe it is not necessary".

But if you find useful I can think another name and publish it via NPM.

Regards.

felixzapata commented 7 years ago

@leandromatos I've published the plugin

leandromatos commented 7 years ago

Thanks @felixzapata !