Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set UTF-8 encoding to translations.js.erb #139

Closed
wants to merge 1 commit into from
Closed

set UTF-8 encoding to translations.js.erb #139

wants to merge 1 commit into from

Conversation

neckhair
Copy link

This fixes issue #137.

The file translations.js.erb should be forced to use UTF-8 or there will be an 'invalid byte sequence'-error in Rails 3.2.13 when non us-ascii characters are used in some translation files.

@ggayan
Copy link

ggayan commented Mar 18, 2013

👍

@toao
Copy link

toao commented Mar 18, 2013

👍

@shell
Copy link

shell commented Mar 18, 2013

Merge pls pls

@conzett
Copy link

conzett commented Mar 18, 2013

+1 for this, somewhat urgent as it's tied to a Rails security update.

@toao
Copy link

toao commented Mar 18, 2013

you can use to following line in your gemfile until the PR is merged

gem 'i18n-js', :git => 'git://github.com/sientia-phi/i18n-js.git', :ref => '703265'

@conzett
Copy link

conzett commented Mar 18, 2013

Yup, that's what I'm using now.
gem 'i18n-js', git: 'git://github.com/sientia-phi/i18n-js.git', branch: 'fix_utf8_encoding'
👍

@tkawachi
Copy link

Please merge and release it.

@tkawachi
Copy link

master branch contains a fix for 2.1 releases.
For those who are using v2.1.2, modify Gemfile to

gem 'i18n-js', :git => 'git@github.com:fnando/i18n-js.git', :branch => 'master'

and bundle update i18n-js will remove invalid byte sequence in US-ASCII error.

@aratak
Copy link

aratak commented Mar 19, 2013

@tkawachi, bundler has a special github syntax with default master branch:

gem 'i18n-js', :github => 'fnando/i18n-js'

@menkel
Copy link

menkel commented Mar 20, 2013

Please merge and release it.

@romanbsd
Copy link

👍

@tkawachi
Copy link

@aratak Thanks I did't know.

@scsmith
Copy link

scsmith commented Mar 21, 2013

This fix didn't actually work for me. When the encoding is specified it seems to stop the required files specified in the manifest from being included too. This leads to Uncaught ReferenceError: I18n is not defined.

I moved the translations into their own file (#140) so that only the translations and encoding were specified and there was no encoding specified in the manifest file and all seems to work fine.

@PikachuEXE
Copy link

Author just add this commit
Which means this PR is not necessary anymore

@hmaack
Copy link

hmaack commented Apr 2, 2013

Thanx @aratak , I switched to the github master like you said and it works fine

@PikachuEXE
Copy link

@rocknruby Have you tried branch rewrite?

@hmaack
Copy link

hmaack commented Apr 2, 2013

No, just:

gem 'i18n-js', :github => 'fnando/i18n-js'

@harmon
Copy link

harmon commented Apr 18, 2013

+1 for merge. This fixed upgrading to Rails 3.2.13 for us as well. I am stuck using:

Gemfile:

# Using the master branch until there is a fix for https://github.com/fnando/i18n-js/issues/137
gem 'i18n-js', :github => 'fnando/i18n-js'
# gem 'i18n-js', '= 2.1.2'

Since we use vendor/cache for caching our gems for deployment, I had to run:

# Bundler version v1.2.1, Bundler 2.0 does this by default now.
$ bundle package --all

@bertBruynooghe
Copy link

This is really annoying. I can't use the github syntax since I use i18n-js in a gem, so I can only specify versions, not repositories. The only solution for now is to add this github line to all gemfiles including my gem, which is not nice.
Btw, getting rid of i18n-js isn't an option either, as i18n-js is included in devise too...

Please merge and update the gemserver...

@PikachuEXE
Copy link

I have no idea why this is not merged...plus some other PR

@marcusg
Copy link

marcusg commented May 13, 2013

any chance this gets merged some day?

@PikachuEXE
Copy link

There are a few PR should merged as soon as possible
The author should be still active but not sure what is holding these PRs

@toao
Copy link

toao commented May 13, 2013

@fnando y u no merge?

@gfrivolt
Copy link

this fix works for me too..

@philipjkim
Copy link

👍

@cimm
Copy link

cimm commented Jun 20, 2013

The last commit on this repo is a year old. I mailed the owner, no response. Is there anyone who wants to fork this and maintain the gem? I like this gem, we use it on different production systems, but maybe it's time to admit this is old unmaintained code?

@PikachuEXE
Copy link

@cimm The last commit is not a year ago
But all recent commits are in rewrite branch
He sometimes commit something but not merging pull request
So it's hard to decide whether this project is actively maintained or not

@cimm
Copy link

cimm commented Jun 20, 2013

@PikachuEXE Oh, sorry, didn't notice that. Thanks for pointing out.

@harmon
Copy link

harmon commented Jun 20, 2013

I too emailed the owner a couple weeks ago (had Google translate it to Portuguese...). No luck, either.

@fnando
Copy link
Owner

fnando commented Jun 20, 2013

Sorry people!

I'll work on these PRs this weekend. Too busy. :(

Abraços!

Nando Vieira
http://nandovieira.com.br

On 20/06/2013, at 12:30, Adam Grant notifications@github.com wrote:

I too emailed the owner a couple weeks ago (had Google translate it to Portuguese...). No luck, either.


Reply to this email directly or view it on GitHub.

@conzett
Copy link

conzett commented Jun 20, 2013

@fnando I would be happy to help with bugs if needed, even if it's just verifying or writing failing test cases.

@cimm
Copy link

cimm commented Jul 8, 2013

@fnando Can you please merge this?

@etagwerker
Copy link

I just started using this gem and ran into this issue on 2.1.2. I see that there is a fix in master

@fnando when do you plan to do a new release?

@shell
Copy link

shell commented Oct 16, 2013

@fnando Merge please

@diminish7
Copy link

@fnando I see that this fix is already on master, but it isn't out on rubygems with a new version number. When you get a chance, would you mind pushing the newest up to rubygems? Thanks!

@PhilCoggins
Copy link

@diminish7 +1

@fnando

@PikachuEXE
Copy link

Temporary gem: http://rubygems.org/gems/i18n-js-pika

@neckhair neckhair mentioned this pull request Feb 17, 2014
@johnnyshields
Copy link

Is this now fixed on master? If so, may we close this PR?

@PikachuEXE
Copy link

@PikachuEXE PikachuEXE closed this Jun 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.