Defect #1153

GLoc::RuleNotFoundError after update to r1388

Added by F. D. Castel about 10 years ago. Updated about 10 years ago.

Status:ClosedStart date:2008-05-01
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution:Invalid Affected version:


I just updated my working copy to r1388.

However, now I'm getting this exception in several places when using pt-br.yml:

GLoc::RuleNotFoundError in My#account

Showing my/_sidebar.rhtml where line #6 raised:

There is no rule called 'default' in the pt-br rules.

Extracted source (around line #6):

3: <p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
4: <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
5: <% if @user.rss_token %>
6: <p><%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(, @user.rss_token.created_on)) %>
7: (<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)</p>
8: <% end %>

Trace of template inclusion: /my/account.rhtml

RAILS_ROOT: D:/Testes/Ruby/Aptana/Redmine
Application Trace | Framework Trace | Full Trace

vendor/plugins/gloc-1.1.0/lib/gloc-internal.rb:107:in `actual__l_rule'
(eval):4:in `_l_rule'
app/views/my/_sidebar.rhtml:6:in `_run_erb_47app47views47my47_sidebar46rhtml'
app/views/my/account.rhtml:49:in `_run_erb_47app47views47my47account46rhtml'
app/helpers/application_helper.rb:504:in `content_for'
app/views/my/account.rhtml:48:in `_run_erb_47app47views47my47account46rhtml'
-e:2:in `load'

This wasn't occurring in v0.6.

I compared my 'pt-br.yml' file with 'en.yml' and didn't find any significant change.
Using English language the exception didn't occurs.

I'm sending my 'pt-br.yml' file attached.

pt-br.yml Magnifier (25.1 KB) F. D. Castel, 2008-05-01 11:30

pt-br.yml Magnifier - fixed file (25.1 KB) Jean-Philippe Lang, 2008-05-01 14:36

pt-br.yml Magnifier - latest file - fixed two diacriticals (25.1 KB) F. D. Castel, 2008-05-01 22:29


#1 Updated by Jean-Philippe Lang about 10 years ago

  • File pt-br.ymlMagnifier added
  • Status changed from New to Closed
  • Affected version (unused) deleted (0.7.0)
  • Resolution set to Invalid

You have some extra bytes (non-ascii) at the very beginning of your file.
Removing these bytes fixed the problem (file is attached).

Btw, I saw you made some changes to the translation. Should I commit these changes in the repository ?

#2 Updated by F. D. Castel about 10 years ago

Thanks, JP!

Just for curiosity's sake: how did you find this extra bytes? Neither Eclipse, TortoiseDiff nor Notepad displays them. I had to use a binary editor to see them. Maybe they were appended by svnupdate or after conflict solve because of UTF-8 control bytes (but I cannot confirm).

Now it is working flawlessly.

About commit: please, be my guest. I did put a large effort on this file (6~8 hours in total) to make it the most accurate possible. We are using it in our production environment. The current /HEAD file is severely outdated (many messages missing when compared with 'en.yml'), has some errors and have no diacritics at all (which Portuguese language is heavily based on).

BTW: I found two missing diacriticals yesterday. I'm sending the latest file attached (if you prefer a patch, please tell me).

Best regards,


Also available in: Atom PDF