names of sync services are not translatable

Bug #888412 reported by Koichi Akabe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tomdroid
Fix Released
Low
Unassigned

Bug Description

Names of sync services ("SD Card" and "Tomboy Web") are not translatable.

I attached a patch to use strings.xml for getting names of services.

Revision history for this message
Koichi Akabe (vbkaisetsu) wrote :
summary: - names of sync services is not translatable
+ names of sync services are not translatable
description: updated
Changed in tomdroid:
status: New → In Progress
importance: Undecided → Low
status: In Progress → Fix Committed
Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

I pushed the patch to early. It was not working...

At first we would need something like this, otherwise we get back an integer:
    return getString(R.string.prefSDCard);

Unfortunately this does not work, because getString has to be in a Context somehow.
I tried to fix this, but completely failed.
Do you have an Idea what to do?

Changed in tomdroid:
status: Fix Committed → In Progress
Revision history for this message
Koichi Akabe (vbkaisetsu) wrote :

Sorry, my patch was wrong...

In my idea, change getDescription function to return resource id, and convert it to string datas at calling.

 ... = getString(xxx.getDescription())

getDescription is also used in SycnMessageHandler class which is not an activity. But it get the activity variable in the constructor. So we can use it.

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

Hi!

I implemented your plan hopefully the right way. Could you have a look at the patch if this fits to the programming standards?
It works now, but I am unsure if this is the proper way to get the result. Should I rename something?
In case it is well done, I will push my local branch to lp:tomdroid.

Revision history for this message
Koichi Akabe (vbkaisetsu) wrote :

Hi,

I don't know the programming standard, but I think your patch is easy to read.
Just one thing, I think getDescription and Description can confuse.

getDescription is used for getting string datas now. And I don't want to change it because we don't have to change other files in this case.
How do you think "getDescriptionAsId" for getting resource's ids, and "getDescription" for converting ids to strings?

Revision history for this message
Stefan Hammer (j-4-deactivatedaccount) wrote :

I like the Idea -> and already merged! Now we just have to translate the string...
I am not really happy with the String Tomboy Web - it can be misleading with Tomboy Online...
Wouldn't it better to call it "Web-Server", "Web-Synchronisation" or "Websync"... also "Online Synchronisation" would be much better... Nowadays, we can also call it "Cloud Sync" or just "Web Cloud" (because it asks you which way you want to sync).
Whats your opinion?

Changed in tomdroid:
status: In Progress → Fix Committed
Revision history for this message
Koichi Akabe (vbkaisetsu) wrote :

I think so. Tomboy Web is like a web-site name.
"Online Syncronization" is better than current one.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.