Can't find bundle for base name org.syncany.i18n.I18n, locale en_us

Bug #796055 reported by Daniel Kullmann on 2011-06-11
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Syncany
Fix Committed
High
Unassigned

Bug Description

This is the error I got when first running syncany from my checked out bzr repo. Note the lower case locale name ("en_us"), the file in the repo uses "en_US" as locale name. I solved the problem by making a copy of the src/org/syncany/i18n/I18n_en_US.properties file to src/org/syncany/i18n/I18n_en_us.properties.

The full stacktrace is:

Exception in thread "main" java.lang.ExceptionInInitializerError
 at org.syncany.Syncany.<clinit>(Syncany.java:40)
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.syncany.i18n.I18n, locale en_us
 at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
 at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
 at java.util.ResourceBundle.getBundle(ResourceBundle.java:777)
 at org.syncany.config.Config.<init>(Config.java:89)
 at org.syncany.config.Config.<clinit>(Config.java:55)
 ... 1 more
Could not find the main class: org.syncany.Syncany. Program will exit.

This is very interesting, especially since the original file name is ...en_US... (with capital US)... [1]
How did you check out? On what system?

[1] http://bazaar.launchpad.net/~syncany-team/syncany/trunk/files/head:/syncany/src/org/syncany/i18n/

I run Ubuntu 11.04, with locale en_GB, and I checked the source code out with
 bzr branch lp:syncany

Simeon Walker (simeon-walker) wrote :

This rings bell with me. I think the java function should use ("en, "us") rather than ("en_us").

For me, both version work:
 public static final Locale DEFAULT_LOCALE = new Locale("en", "US");
and
 public static final Locale DEFAULT_LOCALE = new Locale("en", "us");

So this could be the fix!

On 13/06/11 23:00, Simeon Walker wrote:
> This rings bell with me. I think the java function should use ("en,
> "us") rather than ("en_us").
>

justink (justin-kelly) wrote :

just adding that i had the same problem - on ubuntu 11.04 using bzr branch lp:syncany

copying the en_US to en__us and a rebuild fixed the issue

Daniel, justink,
Did you fix that in the trunk? I cannot reproduce it... Would you mind fixing it?

Changed in syncany:
importance: Undecided → High
milestone: none → 0.1-alpha
Philippe Le Toquin (ppmt) wrote :

I confirm the fix Daniel Kullmann gave.

I now have Syncany running on my ubuntu 11.04

Time to start testing

I don't know how to "fix the bug in trunk". I have no write access to the syncany repo, so what do I do?
I attached a patch to fix the problem.

Hi Daniel,

There are no write restrictions to the syncany trunk so far. As soon
as you're member of the syncany-team, you can commit fixed to the
trunk. However, normally making your own branch would be the way to
go:

$ bzr branch lp:syncany
$ cd syncany
(make changes)
$ bzr commit -m"my changes"
$ bzr push lp:~myusername/syncany/somename

But since it's just small fix, I'll fix it in the trunk and the
"newsync" branch.

Cheers,
Philipp

On Mon, Jun 27, 2011 at 9:10 AM, Daniel Kullmann
<email address hidden> wrote:
> I don't know how to "fix the bug in trunk". I have no write access to the syncany repo, so what do I do?
> I attached a patch to fix the problem.
>
> ** Patch added: "Fixes the bug"
>   https://bugs.launchpad.net/syncany/+bug/796055/+attachment/2182347/+files/796055.patch
>
> --
> You received this bug notification because you are subscribed to
> Syncany.
> https://bugs.launchpad.net/bugs/796055
>
> Title:
>  Can't find bundle for base name org.syncany.i18n.I18n, locale en_us
>
> Status in Syncany:
>  New
>
> Bug description:
>  This is the error I got when first running syncany from my checked out
>  bzr repo. Note the lower case locale name ("en_us"), the file in the
>  repo uses "en_US" as locale name. I solved the problem by making a
>  copy of the src/org/syncany/i18n/I18n_en_US.properties file to
>  src/org/syncany/i18n/I18n_en_us.properties.
>
>  The full stacktrace is:
>
>  Exception in thread "main" java.lang.ExceptionInInitializerError
>        at org.syncany.Syncany.<clinit>(Syncany.java:40)
>  Caused by: java.util.MissingResourceException: Can't find bundle for base name org.syncany.i18n.I18n, locale en_us
>        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
>        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
>        at java.util.ResourceBundle.getBundle(ResourceBundle.java:777)
>        at org.syncany.config.Config.<init>(Config.java:89)
>        at org.syncany.config.Config.<clinit>(Config.java:55)
>        ... 1 more
>  Could not find the main class: org.syncany.Syncany.  Program will exit.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/syncany/+bug/796055/+subscriptions
>

Fixed in newsync. Will be in the trunk sooner or later :-D

Changed in syncany:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers