Bug 373 - Home page links get messed up when switching languages.
: Home page links get messed up when switching languages.
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Audio
: 5.x or older
: All All
: P2 normal (vote)
: ---
Assigned To: KDF
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-14 20:24 UTC by Blackketter Dean
Modified: 2008-12-18 11:55 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
key by unlocalised stings (13.40 KB, patch)
2004-06-15 11:34 UTC, KDF
Details | Diff
fix line endings (13.20 KB, patch)
2004-06-16 14:47 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Blackketter Dean 2004-06-14 20:24:17 UTC
Michael Herger writes:

I changed my SlimServer's language from German to French to English to
German. Now some of the menu entries have tripled: they exist for every
language. For a picture, have a look at the following:

http://www.herger.net/slim/detail.php?nr=166
Comment 1 KDF 2004-06-14 21:55:36 UTC
as I suggested in the list....
two ways to fix:
1) when changing languages, wipe the %additionallinks hash.
2) key the links by the unlocalised string and make the skins handle the
localisation.

option 1 would be less modules to alter, but I'm not sure how it can be done
given the the hash is currently private.  option 2 is far easier, but does
require all the skins to change.  I'm willing to take this (option 2) on if you
would like me to.
Comment 2 Blackketter Dean 2004-06-14 22:26:05 UTC
Thanks for looking at this  Kevin.  I'd prefer to fix it right, so 2 is the best bet.  Can you pull together a 
patch?
Comment 3 KDF 2004-06-14 22:47:08 UTC
yup.  I can already see the code in my head, but need to look over skins to do
it right.  just give me a day or two to get over jet lag while I update
everything it I'll have one for you.
Comment 4 KDF 2004-06-15 10:02:43 UTC
turned out to be very easy, with one exception: Plugins.  The unlocalised string
isn't available.  For now, it will simply have to be keyed by the localised
string.  This is OK fo rnow, since the localised string naming the plugin can
only be localised on server startup.  This is bug 287.  It is due to
getDisplayName returning localised name on startup, and it cannot be changed
later.  With bug 287 solved, this patch can easily be made to apply to plugins
as well.  If this isn't a 5.2 blocker, then I can hold this patch until after
and apply along with the dynamic links (bug 318) and maybe a patch to unlocalise
the plugin name string until we display it.
Comment 5 KDF 2004-06-15 11:34:25 UTC
Created attachment 49 [details]
key by unlocalised stings

Use unlocalised strings for links keys, localise in the skins instead (except
for plugins: see bug 287).
Fix additional browse links in skins so that they can be sorted by localised
string.
Comment 6 Blackketter Dean 2004-06-16 14:17:55 UTC
kdf:  that patch seems to have some the extra blank lines...  can you check your diff?
Comment 7 KDF 2004-06-16 14:47:32 UTC
Created attachment 50 [details]
fix line endings
Comment 8 Blackketter Dean 2004-06-17 11:25:24 UTC
Seems to work well here.   Please check it in!
Comment 9 KDF 2004-06-17 19:00:42 UTC
checked in June 16, 2004
Comment 10 Chris Owens 2007-05-24 15:54:09 UTC
This Slimserver bug was fixed a very long time ago, and is now being marked as Closed.  If you're still experiencing this issue, please verify you are running a current version of Slimserver and re-open the bug.
Comment 11 Chris Owens 2008-12-18 11:55:20 UTC
Routine bug db maintenance; removing old versions which cause confusion.  I apologize for the inconvenience.