Project

General

Profile

Actions

Defect #12900

closed

Template::Error (translation missing: en.date.formats.default)

Added by Terence Mill about 11 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
I18n
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

I get this error when i change to English locale. I checked twice and actually there is no file
public\javascripts\i18n\jquery.ui.datepicker-en.js.

If i copy public\javascripts\i18n\jquery.ui.datepicker-en.js to public\javascripts\i18n\jquery.ui.datepicker-en-GB.js the error is gone.
Strange is that jquery ui repo also don't has such locale
https://code.google.com/p/jquery-ui/source/browse/trunk/ui/i18n/?r=3705

ActionView::Template::Error (translation missing: en.date.formats.default):
    1: <h3><%=l(:label_my_account)%></h3>
    2: 
    3: <p><%=l(:field_login)%>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
    4: <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
    5: 
    6: <% if @user.own_account_deletable? %>
    7:   <p><%= link_to(l(:button_delete_my_account), {:action => 'destroy'}, :class => 'icon icon-del') %></p>
  lib/redmine/i18n.rb:60:in `format_date'
  lib/redmine/i18n.rb:71:in `format_time'
  app/views/my/_sidebar.html.erb:4:in `_app_views_my__sidebar_html_erb___357797368_111603840'
  app/views/my/account.html.erb:48:in `block in _app_views_my_account_html_erb___96936270_109476630'


Related issues

Related to Redmine - Feature #12475: Lazy loading of translation files for faster startupClosedJean-Philippe Lang

Actions
Related to Redmine - Defect #17621: Completed 500 Internal Server Error Closed

Actions
Has duplicate Redmine - Defect #13204: translation missing error_session_expiredClosed

Actions
Has duplicate Redmine - Defect #15617: Regional (i.e. sub) localization not correctly supportedClosed

Actions
Has duplicate Redmine - Defect #16472: Browser translation missing public area under LinuxClosed

Actions
Actions #1

Updated by Etienne Massip about 11 years ago

  • Resolution set to Cant reproduce

Sorry Terence, I can't see the relationship between jQuery and this error stack.

I can't reproduce either, are you sure it is not a plugin issue?

Actions #2

Updated by Etienne Massip about 11 years ago

  • Status changed from New to Needs feedback
Actions #3

Updated by Terence Mill about 11 years ago

I can't test without plugin at the moment, so i can't deny you assumption.
However this sounds strange as plugin issue and what is the answer on "Strange is that jquery ui repo also don't has such locale".
I don't unsetand why all locales exists but none for english? How does this (If so) default work, and maybe that is the explanation if and hwere to nserach the cause for the error.

Actions #4

Updated by Toshi MARUYAMA about 11 years ago

#12475 uses cache.
You need to delete tmp/cache when plugin installing or upgrading redmine.

Actions #5

Updated by Terence Mill about 11 years ago

I think the error is caused by including same or diffreent version of jquery in a plugin.

Actions #6

Updated by Etienne Massip about 11 years ago

Terence Mill wrote:

I think the error is caused by including same or diffreent version of jquery in a plugin.

In which plugin/version is it already included?

Actions #7

Updated by Terence Mill about 11 years ago

redmine_lightbox, redmine_dnoise_workload, redmine_goyello_schedules, redmine_dmsf, redmine_monitoring_controlling, redmine_impasse, redmine_scrumb2, redmine_planner, and many more.

Actions #8

Updated by Etienne Massip about 11 years ago

Terence Mill wrote:

redmine_lightbox, redmine_dnoise_workload, redmine_goyello_schedules, redmine_dmsf, redmine_monitoring_controlling, redmine_impasse, redmine_scrumb2, redmine_planner, and many more.

Niiiiiiiiiiiiice…

I think the error is caused by including same or diffreent version of jquery in a plugin.

What makes you think that?

Actions #9

Updated by Terence Mill about 11 years ago

Toshi MARUYAMA wrote:

#12475 uses cache.
You need to delete tmp/cache when plugin installing or upgrading redmine.

I ran "tmp:sessions:clear" and "tmp:cache:clear" but error stays. So it seems not to be a cache issue

Actions #10

Updated by Andy Alton about 11 years ago

I'm having the exact same problem, but haven't found any way to fix it and keep all the default locale settings. Terence's workaround (copying the datepicker en-GB to en) has no effect.

Any strings in the English locale file fail to show, causing Internal Server Errors on most pages. Even the language itself is shown at the bottom of Settings/Display/Default language and users account page as "translation missing: en.general_lang_name", and it's the only language in the list with that error. Changing the language to en-GB fixes it, but changes all the relevant locale settings too of course...

Redmine version 2.2.1.stable, Ruby version 1.9.3 (i386-mingw32), Rails version 3.2.11.
Gemfile.lock

Actions #11

Updated by Toshi MARUYAMA about 11 years ago

Actions #12

Updated by Andy Alton about 11 years ago

The patch moved the "translation missing: en.general_lang_name" from the bottom of the list to right before "English (British)", but otherwise all the 500 errors are still happening. I also made sure to clear the cache before starting Redmine after patching. The stack trace is the same as in the original report.

Actions #13

Updated by Etienne Massip about 11 years ago

Andy Alton wrote:

Redmine version 2.2.1.stable, Ruby version 1.9.3 (i386-mingw32), Rails version 3.2.11.
Gemfile.lock

Plugins?

Actions #14

Updated by Andy Alton about 11 years ago

I have XLS Export and its dependency Plugin views revisions installed.

Actions #15

Updated by Andy Alton about 11 years ago

Looks like that's part of the reason... Way back, the XLS Export links in the interface would show translation placeholders in the en-GB locale, so I had copied its en.yml to en-GB.yml, which worked fine until 2.1.something. Somewhere between that version and 2.2.1 it stopped working and created this issue, presumably when Redmine sees duplicate locale files and rejects the whole language? Deleting the copy of the plugin's locale file fixes this for me.

Sorry about the confusion, you can ignore my comments on this issue. Back to Terence!

Actions #16

Updated by Daniel Felix about 11 years ago

Andy Alton wrote:

... when Redmine sees duplicate locale files and rejects the whole language?

Well you can experience some likely bug if you add a plugin, which uses a label which isn't added in any translation file.
Some parts of the translation will be broken if Rails couldn't find it in any translation file.

Actions #17

Updated by Jordi Rovira almost 11 years ago

Hi. I am getting an error that may be related to this one with this log in redmine 2.3.0

Completed 500 Internal Server Error in 166ms

ActionView::Template::Error (translation missing: en.date.formats.default):
20: <% for project in Projects Projects >
21: <
Herve Harster = project >
22: <li>
23: <
= link_to_project project > (<= format_time(project.created_on) >)
24: <
= textilizable project.short_description, :project => project >
25: </li>
26: <
end %>
lib/redmine/i18n.rb:60:in `format_date'
lib/redmine/i18n.rb:71:in `format_time'
app/views/welcome/index.html.erb:23:in `_app_views_welcome_index_html_erb__971611127_70124025026480'
app/views/welcome/index.html.erb:20:in `each'
app/views/welcome/index.html.erb:20:in `_app_views_welcome_index_html_erb__971611127_70124025026480'

It has happened to me 2 times in a day, but i don't have an exact repro. The site is accessible and i may be being accessed from different locales. I had two plugins (graphs and google_analytics) but I have removed them now. I will report back if it happens again.

Edit: After checking the log IPs, in both cases it happened after being accessed from Korea and Japan, and then from my own system, with the English locale.

Actions #18

Updated by Toshi MARUYAMA almost 11 years ago

Did you clear cache after installing plugins?
Please see #13520#note-12 (note-12) and following notes.

Actions #19

Updated by Jordi Rovira almost 11 years ago

Toshi MARUYAMA wrote:

Did you clear cache after installing plugins?
Please see #13520#note-12 (note-12) and following notes.

No, but i have done it now. I will report if it crashes again. I was indeed using the Debian packaged version.

Actions #20

Updated by Jordi Rovira almost 11 years ago

Toshi MARUYAMA wrote:

Did you clear cache after installing plugins?
Please see #13520#note-12 (note-12) and following notes.

After clearing the cache, redmine has been working fine for some days. Now i will try reinstalling the plugins and see if everything is still fine. Thank you Toshi!

Actions #21

Updated by Toshi MARUYAMA almost 11 years ago

Terence Mill wrote:

Toshi MARUYAMA wrote:

#12475 uses cache.
You need to delete tmp/cache when plugin installing or upgrading redmine.

I ran "tmp:sessions:clear" and "tmp:cache:clear" but error stays. So it seems not to be a cache issue

Terence, as #13520#note-12 (note-12), "rake tmp:cache:clear" does not work correctly in some case.
You need to delete /var/cache/redmine/ manually if it exists.
Could you try?

Actions #22

Updated by Michael Heinze almost 11 years ago

Hi guys!

My experience with this is:
This error occurs when you copy a language file but you forget to adapt the language code at the top of the copied file!
And it occurs irregularly (only after each x-th server restart) so it is not reproducable.

In my case, I created my own Redmine plugin. So, first there was only an empty "en.yml".
I edited this file and filled in all my strings and identifiers.
After that, I wanted to add another language file ("de.yml"), which I created by copying the "en.yml".
In the "de.yml", I translated all strings but at the top of the file, I forgot to change "en:" to "de:"!
That was why I got the error.

Hope I could help some of you.

Actions #23

Updated by Terence Mill over 10 years ago

I still have the problem after update to 2.3.2 I also searched with wrong locale lavel or missing locale topic label.
Its all fixed still but i still have the problems.
THis seemks to be very influenceable being instable for any errorr in plugins translation files.

Actions #24

Updated by Mr. DTTH over 10 years ago

Terence Mill wrote:

I still have the problem after update to 2.3.2 I also searched with wrong locale lavel or missing locale topic label.
Its all fixed still but i still have the problems.
THis seemks to be very influenceable being instable for any errorr in plugins translation files.

Check all file language in plugins :

_This error occurs when you copy a language file but you forget to adapt the language code at the top of the copied file!
And it occurs irregularly (only after each x-th server restart) so it is not reproducable.

In my case, I created my own Redmine plugin. So, first there was only an empty "en.yml".
I edited this file and filled in all my strings and identifiers.
After that, I wanted to add another language file ("de.yml"), which I created by copying the "en.yml".
In the "de.yml", I translated all strings but at the top of the file, I forgot to change "en:" to "de:"!
That was why I got the error._

Actions #25

Updated by Alberto Cennini over 10 years ago

Minh Thien Nguyen wrote:

Terence Mill wrote:

I still have the problem after update to 2.3.2 I also searched with wrong locale lavel or missing locale topic label.
Its all fixed still but i still have the problems.
THis seemks to be very influenceable being instable for any errorr in plugins translation files.

Check all file language in plugins :

_This error occurs when you copy a language file but you forget to adapt the language code at the top of the copied file!
And it occurs irregularly (only after each x-th server restart) so it is not reproducable.

In my case, I created my own Redmine plugin. So, first there was only an empty "en.yml".
I edited this file and filled in all my strings and identifiers.
After that, I wanted to add another language file ("de.yml"), which I created by copying the "en.yml".
In the "de.yml", I translated all strings but at the top of the file, I forgot to change "en:" to "de:"!
That was why I got the error._

This is exactly the same error I did: I created it.yml starting from en.yml and I forgot to change the language identification label in the top of the file (en:). The result was that 'en' language stopped working: label missing on all the pages and crashes in modules if they used date.format.default.
I corrected the mistake and everything began to reoperate correctly.

Actions #26

Updated by Terence Mill over 10 years ago

IT should me more error poff or at least show an error for the locale file where name<>locake topic ..
Its really difficult to find that bad file if you use many plugins.

Actions #27

Updated by Toshi MARUYAMA over 10 years ago

  • Has duplicate Defect #15617: Regional (i.e. sub) localization not correctly supported added
Actions #28

Updated by Jérôme BATAILLE over 10 years ago

Hi, we experienced the same problems on our Redmine servers.

We have developed a home made plugin.
On our integration server this plugin was containing an en-GB locale file with the first line wrongly set to en.
Loading this file by choosing the en-GB user locale, was systematically erasing the en translations.

This has been fixed.

On our production, we have migrated the plugin from Redmine V1.2.1 to V2.3.2.
The old plugin was containing the bad locale key, and this was not creating issues before the migration with the old Redmine version.
With the new version, even if the locale key has been fixed, we experience the en translations lost.

During the migration we applied the tmp:sessions:clear and tmp:cache:clear

Is there is a possibility that the wrong key value stays in the cache ?
Is the cache grepable to verify that ?

Actions #29

Updated by Toshi MARUYAMA almost 10 years ago

  • Has duplicate Defect #16472: Browser translation missing public area under Linux added
Actions #30

Updated by Toshi MARUYAMA almost 10 years ago

Jérôme BATAILLE wrote:

During the migration we applied the tmp:sessions:clear and tmp:cache:clear

Is there is a possibility that the wrong key value stays in the cache ?
Is the cache grepable to verify that ?

See:
#13520#note-12

Actions #31

Updated by Toshi MARUYAMA over 9 years ago

  • Related to Defect #17621: Completed 500 Internal Server Error added
Actions #32

Updated by Tobias Fischer over 9 years ago

I had the same bug hanging around randomly and it was definately fixed after I checked and cleaned up all the plugins language files were sometimes there was a file "de.yml" with unchanged "en:"

Actions #33

Updated by dominik ch about 9 years ago

I had same issue, language "English" was missing when it's for each plugin defined,
I found out that one of plugin had broken lang file, it's easy to find that using:

grep -R "en:" | grep "yml" | grep -v "/en.yml:en:" | grep ":en:" 

This will give all *.yml files with "en:" and not "en.yml", You can easily review and find mistake.

Actions #34

Updated by Lucky Boy over 6 years ago

dominik ch wrote:

This will give all *.yml files with "en:" and not "en.yml", You can easily review and find mistake.

This work! thanks...

Actions #35

Updated by Go MAEDA about 2 months ago

  • Status changed from Needs feedback to Closed
Actions

Also available in: Atom PDF