Vote #73179
未完了Template::Error (translation missing: en.date.formats.default)
0%
説明
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:
<%=l(:label_my_account)%>¶
2:
3: <%=l(:field_login)%>: <%= link_to_user(@user, :format => :username) %>
4: <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>
5:
6: <% if @user.own_account_deletable? %>
7: <%= link_to(l(:button_delete_my_account), {:action => 'destroy'}, :class => 'icon icon-del') %>
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'
journals
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?
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
#12475 uses cache.
You need to delete tmp/cache when plugin installing or upgrading redmine.
--------------------------------------------------------------------------------
I think the error is caused by including same or diffreent version of jquery in a plugin.
--------------------------------------------------------------------------------
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?
--------------------------------------------------------------------------------
redmine_lightbox, redmine_dnoise_workload, redmine_goyello_schedules, redmine_dmsf, redmine_monitoring_controlling, redmine_impasse, redmine_scrumb2, redmine_planner, and many more.
--------------------------------------------------------------------------------
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?
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
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":http://pastebin.com/embed_iframe.php?i=SRQBNysQ
--------------------------------------------------------------------------------
Could you try "revert-r10844.diff":http://www.redmine.org/attachments/download/8833/revert-r10844.diff in #12861#note-12 ?
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Andy Alton wrote:
> Redmine version 2.2.1.stable, Ruby version 1.9.3 (i386-mingw32), Rails version 3.2.11.
> "Gemfile.lock":http://pastebin.com/embed_iframe.php?i=SRQBNysQ
Plugins?
--------------------------------------------------------------------------------
I have "XLS Export":http://www.redmine.org/plugins/redmine_xls_export and its dependency "Plugin views revisions":http://www.redmine.org/plugins/redmine_plugin_views_revisions installed.
--------------------------------------------------------------------------------
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!
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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 %>
21: <% @project = 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.
--------------------------------------------------------------------------------
Did you clear cache after installing plugins?
Please see #13520#note-12 (note-12) and following notes.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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!
--------------------------------------------------------------------------------
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?
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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._
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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 ?
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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:"
--------------------------------------------------------------------------------
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:
<pre>
grep -R "en:" | grep "yml" | grep -v "/en.yml:en:" | grep ":en:"
</pre>
This will give all *.yml files with "en:" and not "en.yml", You can easily review and find mistake.
--------------------------------------------------------------------------------
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...
--------------------------------------------------------------------------------
related_issues
relates,Closed,12475,Lazy loading of translation files for faster startup
relates,Closed,17621,Completed 500 Internal Server Error
duplicates,Closed,13204,translation missing error_session_expired
duplicates,Closed,15617,Regional (i.e. sub) localization not correctly supported
duplicates,Closed,16472,Browser translation missing public area under Linux