Tushar Patil
2013-Jul-17 11:24 UTC
help regarding internationalization for bootstrap button.
Hi, I am trying to convert my application in hindi, I am stuck in the renaming submit button name, It works fine for hindi but not working for english, it gives syntax error, here is my submit button code <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create Company")), :class => ''btn btn-primary'' %> Create Company => mention in the hi.bootstrap.yml file Please, let me know where i am wrong. Thanks.. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAMFjjRe%2Bs1pkZ2Y9SWqitFGEFy3%2BkEZTNp7c34Luo-3mCfVXkg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Colin Law
2013-Jul-17 11:39 UTC
Re: help regarding internationalization for bootstrap button.
On 17 July 2013 12:24, Tushar Patil <tushar01patil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > I am trying to convert my application in hindi, I am stuck in the renaming > submit button name, It works fine for hindi but not working for english, it > gives syntax error, here is my submit button code > > <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create > Company")), :class => ''btn btn-primary'' %>I have not used internationalisation, but should that be <%= f.submit t(''.Create Company''), :default => t("helpers.links.Create> Company"), :class => ''btn btn-primary'' %>Colin> > Create Company => mention in the hi.bootstrap.yml file > Please, let me know where i am wrong. > > Thanks.. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/CAMFjjRe%2Bs1pkZ2Y9SWqitFGEFy3%2BkEZTNp7c34Luo-3mCfVXkg%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv6Q%2BuaW6PUZ86LXzcbJ9f5qy8Gd8oH56Y_BDw8o0Vwyg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Dheeraj Kumar
2013-Jul-17 12:56 UTC
Re: help regarding internationalization for bootstrap button.
A key is a symbol. Don''t use capitalization or whitespace in it. -- Dheeraj Kumar On Wednesday 17 July 2013 at 5:09 PM, Colin Law wrote:> On 17 July 2013 12:24, Tushar Patil <tushar01patil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (mailto:tushar01patil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)> wrote: > > Hi, > > I am trying to convert my application in hindi, I am stuck in the renaming > > submit button name, It works fine for hindi but not working for english, it > > gives syntax error, here is my submit button code > > > > <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create > > Company")), :class => ''btn btn-primary'' %> > > > > > I have not used internationalisation, but should that be > <%= f.submit t(''.Create Company''), :default => t("helpers.links.Create > > Company"), :class => ''btn btn-primary'' %> > > > Colin > > > > > Create Company => mention in the hi.bootstrap.yml file > > Please, let me know where i am wrong. > > > > Thanks.. > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/rubyonrails-talk/CAMFjjRe%2Bs1pkZ2Y9SWqitFGEFy3%2BkEZTNp7c34Luo-3mCfVXkg%40mail.gmail.com. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv6Q%2BuaW6PUZ86LXzcbJ9f5qy8Gd8oH56Y_BDw8o0Vwyg%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5AA6F9D7142841ECA13FCB5F26955AD0%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jul-17 14:55 UTC
Re: help regarding internationalization for bootstrap button.
On Jul 17, 2013, at 4:39 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 17 July 2013 12:24, Tushar Patil <tushar01patil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Hi, >> I am trying to convert my application in hindi, I am stuck in the renaming >> submit button name, It works fine for hindi but not working for english, it >> gives syntax error, here is my submit button code >> >> <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create >> Company")), :class => ''btn btn-primary'' %> > > I have not used internationalisation, but should that be > <%= f.submit t(''.Create Company''), :default => t("helpers.links.Create >> Company"), :class => ''btn btn-primary'' %> >In this case, probably not -- the #t helper takes a default: option in case the first item is not found in the translation tables. I suspect the key ''.Create Company'' to be the culprit -- and actually I think the leading ''.'' in this case might be the problem. Very hard to tell without seeing the translation tables. Making a translation key a spaced phrase with capitals is unusual as well -- these things are keys, and just seeing this seems odd to me. It might work? It certainly seems to be working for the default translation token. Tushar, please paste in the segments from each of your translation files so we can see the actual code?> Colin > >> >> Create Company => mention in the hi.bootstrap.yml file >> Please, let me know where i am wrong. >> >> Thanks.. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rubyonrails-talk/CAMFjjRe%2Bs1pkZ2Y9SWqitFGEFy3%2BkEZTNp7c34Luo-3mCfVXkg%40mail.gmail.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv6Q%2BuaW6PUZ86LXzcbJ9f5qy8Gd8oH56Y_BDw8o0Vwyg%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/67BD485C-C111-4926-A9AD-0305CABE03D1%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jul-17 14:57 UTC
Re: help regarding internationalization for bootstrap button.
On Jul 17, 2013, at 5:56 AM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> A key is a symbol. Don''t use capitalization or whitespace in it.Dheeraj, this was my understanding as well, although the quoted dot-element strings seem to work as non-symbols. I''ve not seen spaces and capitals, but I also see that the same construct is used in the default: t() call in Tushar''s code.> > -- > Dheeraj Kumar > > On Wednesday 17 July 2013 at 5:09 PM, Colin Law wrote: > >> On 17 July 2013 12:24, Tushar Patil <tushar01patil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> Hi, >>> I am trying to convert my application in hindi, I am stuck in the renaming >>> submit button name, It works fine for hindi but not working for english, it >>> gives syntax error, here is my submit button code >>> >>> <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create >>> Company")), :class => ''btn btn-primary'' %> >> >> I have not used internationalisation, but should that be >> <%= f.submit t(''.Create Company''), :default => t("helpers.links.Create >>> Company"), :class => ''btn btn-primary'' %> >> >> Colin >> >>> >>> Create Company => mention in the hi.bootstrap.yml file >>> Please, let me know where i am wrong. >>> >>> Thanks.. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Talk" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/rubyonrails-talk/CAMFjjRe%2Bs1pkZ2Y9SWqitFGEFy3%2BkEZTNp7c34Luo-3mCfVXkg%40mail.gmail.com. >>> For more options, visit https://groups.google.com/groups/opt_out. >> >> -- >> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv6Q%2BuaW6PUZ86LXzcbJ9f5qy8Gd8oH56Y_BDw8o0Vwyg%40mail.gmail.com. >> For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5AA6F9D7142841ECA13FCB5F26955AD0%40gmail.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5BEFDDDF-05F8-45BF-9033-10B498B3A6AD%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jul-17 15:01 UTC
Re: help regarding internationalization for bootstrap button.
Pardon the follow up on myself… On Jul 17, 2013, at 7:55 AM, Tamara Temple <tamouse.lists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Jul 17, 2013, at 4:39 AM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 17 July 2013 12:24, Tushar Patil <tushar01patil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> Hi, >>> I am trying to convert my application in hindi, I am stuck in the renaming >>> submit button name, It works fine for hindi but not working for english, it >>> gives syntax error, here is my submit button code >>> >>> <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create >>> Company")), :class => ''btn btn-primary'' %> >> >> I have not used internationalisation, but should that be >> <%= f.submit t(''.Create Company''), :default => t("helpers.links.Create >>> Company"), :class => ''btn btn-primary'' %> >> > > In this case, probably not -- the #t helper takes a default: option in case the first item is not found in the translation tables. > > I suspect the key ''.Create Company'' to be the culprit -- and actually I think the leading ''.'' in this case might be the problem. Very hard to tell without seeing the translation tables. Making a translation key a spaced phrase with capitals is unusual as well -- these things are keys, and just seeing this seems odd to me. It might work? It certainly seems to be working for the default translation token. > > Tushar, please paste in the segments from each of your translation files so we can see the actual code? > >> Colin >> >>> >>> Create Company => mention in the hi.bootstrap.yml file >>> Please, let me know where i am wrong.Tushar, please try this: remove the default: from the t() call, and see if you get the translation not found error? <% f.submit t(''.Create Company''), class: ''btn btn-primary'' %> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/47FF4740-3AF9-4528-8AF2-60EE57C1CECF%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Tushar Patil
2013-Jul-18 08:51 UTC
Re: help regarding internationalization for bootstrap button.
Hi, Here i mention my hi.bootstrap.yml file, and i use create company => key use in form.html <%= f.submit t(''.create company'', :default => t("helpers.links.Create Company")), :class => ''btn btn-primary'' %> It works fine for Hindi, but it gives problem for English hi: helpers: actions: "क्रिया" links: Edit: "संपादित करें" new: "नई" update: "अपडेट" cancel: "रद्द करें" enable: "द्रश्य" disable: "अदृश्य" Create Company: "कंपनी बनाएं" Delete: "हटाना" Let me know where i am wrong On Wednesday, July 17, 2013 8:31:08 PM UTC+5:30, tamouse wrote:> > Pardon the follow up on myself… > > On Jul 17, 2013, at 7:55 AM, Tamara Temple <tamous...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<javascript:>> > wrote: > > > > > On Jul 17, 2013, at 4:39 AM, Colin Law <cla...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org<javascript:>> > wrote: > > > >> On 17 July 2013 12:24, Tushar Patil <tushar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> > wrote: > >>> Hi, > >>> I am trying to convert my application in hindi, I am stuck in the > renaming > >>> submit button name, It works fine for hindi but not working for > english, it > >>> gives syntax error, here is my submit button code > >>> > >>> <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create > >>> Company")), :class => ''btn btn-primary'' %> > >> > >> I have not used internationalisation, but should that be > >> <%= f.submit t(''.Create Company''), :default => t("helpers.links.Create > >>> Company"), :class => ''btn btn-primary'' %> > >> > > > > In this case, probably not -- the #t helper takes a default: option in > case the first item is not found in the translation tables. > > > > I suspect the key ''.Create Company'' to be the culprit -- and actually I > think the leading ''.'' in this case might be the problem. Very hard to tell > without seeing the translation tables. Making a translation key a spaced > phrase with capitals is unusual as well -- these things are keys, and just > seeing this seems odd to me. It might work? It certainly seems to be > working for the default translation token. > > > > Tushar, please paste in the segments from each of your translation files > so we can see the actual code? > > > >> Colin > >> > >>> > >>> Create Company => mention in the hi.bootstrap.yml file > >>> Please, let me know where i am wrong. > > > Tushar, please try this: remove the default: from the t() call, and see if > you get the translation not found error? > > <% f.submit t(''.Create Company''), class: ''btn btn-primary'' %> > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/45456acb-e2da-4981-ac67-78e71686736a%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Walter Lee Davis
2013-Jul-18 10:31 UTC
Re: help regarding internationalization for bootstrap button.
On Jul 18, 2013, at 4:51 AM, Tushar Patil wrote:> Hi, > Here i mention my hi.bootstrap.yml file, and i use > create company => key use in form.html > > <%= f.submit t(''.create company'', :default => t("helpers.links.Create Company")), :class => ''btn btn-primary'' %> > > It works fine for Hindi, but it gives problem for English > > hi: > helpers: > actions: "क्रिया" > > links: > Edit: "संपादित करें" > new: "नई" > update: "अपडेट" > cancel: "रद्द करें" > enable: "द्रश्य" > disable: "अदृश्य" > Create Company: "कंपनी बनाएं" > Delete: "हटाना" > > Let me know where i am wrongYAML has very specific white-space requirements. Make sure you haven''t substituted a tab for two spaces somewhere. Also, is this bit you''ve quoted here correct? I have only ever seen a single space after the colon when defining a string value. Do the quotes make what you put here okay? Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/54C78D04-779C-413B-AF95-D0BD4CA75107%40wdstudio.com. For more options, visit https://groups.google.com/groups/opt_out.
Tushar Patil
2013-Jul-18 10:59 UTC
Re: help regarding internationalization for bootstrap button.
As per your suggestion i only put one space between key & value, but it still won''t work. On Thu, Jul 18, 2013 at 4:01 PM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org>wrote:> > On Jul 18, 2013, at 4:51 AM, Tushar Patil wrote: > > > Hi, > > Here i mention my hi.bootstrap.yml file, and i use > > create company => key use in form.html > > > > <%= f.submit t(''.create company'', :default => t("helpers.links.Create > Company")), :class => ''btn btn-primary'' %> > > > > It works fine for Hindi, but it gives problem for English > > > > hi: > > helpers: > > actions: "क्रिया" > > > > links: > > Edit: "संपादित करें" > > new: "नई" > > update: "अपडेट" > > cancel: "रद्द करें" > > enable: "द्रश्य" > > disable: "अदृश्य" > > Create Company: "कंपनी बनाएं" > > Delete: "हटाना" > > > > Let me know where i am wrong > > YAML has very specific white-space requirements. Make sure you haven''t > substituted a tab for two spaces somewhere. Also, is this bit you''ve quoted > here correct? I have only ever seen a single space after the colon when > defining a string value. Do the quotes make what you put here okay? > > Walter > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/rubyonrails-talk/pGcnD5NNKmo/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/54C78D04-779C-413B-AF95-D0BD4CA75107%40wdstudio.com > . > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAMFjjRdcCH44Ftpn%2BhiYjLjTr3%2BphxfWvH1qTzeCKto_sdgwzg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Walter Lee Davis
2013-Jul-18 11:05 UTC
Re: help regarding internationalization for bootstrap button.
You may want to try this: http://www.yamllint.com And I know you already know this, but make sure your text editor is giving you UTF-8 code-points for your non-ASCII characters. BBEdit can help with this. Walter On Jul 18, 2013, at 6:59 AM, Tushar Patil wrote:> As per your suggestion i only put one space between key & value, but it still won''t work. > > > On Thu, Jul 18, 2013 at 4:01 PM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > On Jul 18, 2013, at 4:51 AM, Tushar Patil wrote: > > > Hi, > > Here i mention my hi.bootstrap.yml file, and i use > > create company => key use in form.html > > > > <%= f.submit t(''.create company'', :default => t("helpers.links.Create Company")), :class => ''btn btn-primary'' %> > > > > It works fine for Hindi, but it gives problem for English > > > > hi: > > helpers: > > actions: "क्रिया" > > > > links: > > Edit: "संपादित करें" > > new: "नई" > > update: "अपडेट" > > cancel: "रद्द करें" > > enable: "द्रश्य" > > disable: "अदृश्य" > > Create Company: "कंपनी बनाएं" > > Delete: "हटाना" > > > > Let me know where i am wrong > > YAML has very specific white-space requirements. Make sure you haven''t substituted a tab for two spaces somewhere. Also, is this bit you''ve quoted here correct? I have only ever seen a single space after the colon when defining a string value. Do the quotes make what you put here okay? > > Walter > > -- > You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/pGcnD5NNKmo/unsubscribe. > To unsubscribe from this group and all its topics, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/54C78D04-779C-413B-AF95-D0BD4CA75107%40wdstudio.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAMFjjRdcCH44Ftpn%2BhiYjLjTr3%2BphxfWvH1qTzeCKto_sdgwzg%40mail.gmail.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/93E9D59A-166B-450A-A4D7-E7B010B3FCBA%40wdstudio.com. For more options, visit https://groups.google.com/groups/opt_out.
Rob Biedenharn
2013-Jul-18 20:23 UTC
Re: help regarding internationalization for bootstrap button.
On 2013-Jul-18, at 04:51 , Tushar Patil wrote:> Hi, > Here i mention my hi.bootstrap.yml file, and i use > create company => key use in form.html > > <%= f.submit t(''.create company'', :default => t("helpers.links.Create Company")), :class => ''btn btn-primary'' %> > > It works fine for Hindi, but it gives problem for English > > hi: > helpers: > actions: "क्रिया" > > links: > Edit: "संपादित करें" > new: "नई" > update: "अपडेट" > cancel: "रद्द करें" > enable: "द्रश्य" > disable: "अदृश्य" > Create Company: "कंपनी बनाएं" > Delete: "हटाना" > > Let me know where i am wrongHave you tried putting quotes around the key having a space? "Create Company": "कंपनी बनाएं" Having extra space between the : and the value does not matter (especially since you have a quoted value). The only difference that an unquoted value would have is all the leading spaces would be removed from the value. -Rob> > On Wednesday, July 17, 2013 8:31:08 PM UTC+5:30, tamouse wrote: > Pardon the follow up on myself… > > On Jul 17, 2013, at 7:55 AM, Tamara Temple <tamous...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Jul 17, 2013, at 4:39 AM, Colin Law <cla...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > >> On 17 July 2013 12:24, Tushar Patil <tushar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>> Hi, > >>> I am trying to convert my application in hindi, I am stuck in the renaming > >>> submit button name, It works fine for hindi but not working for english, it > >>> gives syntax error, here is my submit button code > >>> > >>> <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create > >>> Company")), :class => ''btn btn-primary'' %> > >> > >> I have not used internationalisation, but should that be > >> <%= f.submit t(''.Create Company''), :default => t("helpers.links.Create > >>> Company"), :class => ''btn btn-primary'' %> > >> > > > > In this case, probably not -- the #t helper takes a default: option in case the first item is not found in the translation tables. > > > > I suspect the key ''.Create Company'' to be the culprit -- and actually I think the leading ''.'' in this case might be the problem. Very hard to tell without seeing the translation tables. Making a translation key a spaced phrase with capitals is unusual as well -- these things are keys, and just seeing this seems odd to me. It might work? It certainly seems to be working for the default translation token. > > > > Tushar, please paste in the segments from each of your translation files so we can see the actual code? > > > >> Colin > >> > >>> > >>> Create Company => mention in the hi.bootstrap.yml file > >>> Please, let me know where i am wrong. > > > Tushar, please try this: remove the default: from the t() call, and see if you get the translation not found error? > > <% f.submit t(''.Create Company''), class: ''btn btn-primary'' %> > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/45456acb-e2da-4981-ac67-78e71686736a%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/B8A380BA-12C5-4BC6-93CD-2237EDA55E14%40agileconsultingllc.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jul-19 07:23 UTC
Re: help regarding internationalization for bootstrap button.
On Jul 18, 2013, at 1:51 AM, Tushar Patil <tushar01patil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > Here i mention my hi.bootstrap.yml file, and i use > create company => key use in form.html > > <%= f.submit t(''.create company'', :default => t("helpers.links.Create Company")), :class => ''btn btn-primary'' %> > > It works fine for Hindi, but it gives problem for English > > hi: > helpers: > actions: "क्रिया" > > links: > Edit: "संपादित करें" > new: "नई" > update: "अपडेट" > cancel: "रद्द करें" > enable: "द्रश्य" > disable: "अदृश्य" > Create Company: "कंपनी बनाएं" > Delete: "हटाना" > > Let me know where i am wrongWell, first problem I''m noting is that you''re saying it works with you''re hindi file, and you posted your hindi file. You say it doesn''t work with english, but you didn''t post the english translation file. Any idea why?> > On Wednesday, July 17, 2013 8:31:08 PM UTC+5:30, tamouse wrote: > Pardon the follow up on myself… > > On Jul 17, 2013, at 7:55 AM, Tamara Temple <tamous...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Jul 17, 2013, at 4:39 AM, Colin Law <cla...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > >> On 17 July 2013 12:24, Tushar Patil <tushar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>> Hi, > >>> I am trying to convert my application in hindi, I am stuck in the renaming > >>> submit button name, It works fine for hindi but not working for english, it > >>> gives syntax error, here is my submit button code > >>> > >>> <%= f.submit t(''.Create Company'', :default => t("helpers.links.Create > >>> Company")), :class => ''btn btn-primary'' %> > >> > >> I have not used internationalisation, but should that be > >> <%= f.submit t(''.Create Company''), :default => t("helpers.links.Create > >>> Company"), :class => ''btn btn-primary'' %> > >> > > > > In this case, probably not -- the #t helper takes a default: option in case the first item is not found in the translation tables. > > > > I suspect the key ''.Create Company'' to be the culprit -- and actually I think the leading ''.'' in this case might be the problem. Very hard to tell without seeing the translation tables. Making a translation key a spaced phrase with capitals is unusual as well -- these things are keys, and just seeing this seems odd to me. It might work? It certainly seems to be working for the default translation token. > > > > Tushar, please paste in the segments from each of your translation files so we can see the actual code? > > > >> Colin > >> > >>> > >>> Create Company => mention in the hi.bootstrap.yml file > >>> Please, let me know where i am wrong. > > > Tushar, please try this: remove the default: from the t() call, and see if you get the translation not found error? > > <% f.submit t(''.Create Company''), class: ''btn btn-primary'' %> > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/45456acb-e2da-4981-ac67-78e71686736a%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/E28681C7-850D-4D09-9F97-BBF1A0527A55%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.