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

Fix missing extension from message file causing panic #561

Closed
wants to merge 1 commit into from
Closed

Fix missing extension from message file causing panic #561

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 19, 2014

This pull request fixes panic caused by missing extension from i18n message file.

Steps to reproduce:

  1. Checkout: https://github.com/WinWiny/revel-i18n-bug
  2. $ revel run github.com/WinWiny/revel-i18n-bug
  3. Visit http://localhost:9000/
  4. Revel panics

This patch kindly instructs users of this error using log message.

locale := parseLocaleFromFileName(info.Name())
locale, error := parseLocaleFromFileName(info.Name())
if error != nil {
WARN.Printf("Missing locale extension from file: \"%s\"", info.Name())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is WARN the right place for this error message?

@brendensoares brendensoares self-assigned this Mar 27, 2014
@brendensoares brendensoares added this to the v0.10 milestone Mar 27, 2014
@pushrax
Copy link
Contributor

pushrax commented Apr 8, 2014

Does #567 fix this issue?

@brendensoares
Copy link
Member

@WinWiny I'm closing this PR assuming that #567 addresses this issue more directly as mentioned by @pushrax.

Thank you for contributing and feel free to discuss further if we missed something that this PR covers!

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.

None yet

2 participants