Jump to content

Trying to figure out the localization strings


politby

Recommended Posts

politby

I am trying to localize MBC, now that it seems the overwriting of string xml files has stopped happening. :)

 

But it seems there is some inconsistency w/ r t which strings are picked up from where, and some are missing.

 

Logically, it seems it should be

  1. strings-<locale>.xml: any strings not unique to a specific theme
  2. <theme>-strings-<locale>.xml: theme specific strings plus optional overrides of strings from (1)

 

In this example, the "action" strings in the movie detail screen, the localization of "Play" is found in the "strings-sv.xml" file (in my Swedish case):

<Playstr>Spela upp</Playstr>

and results in

 

539975bec5241_1.png

 

 

But "Cast..." and "Scenes..." are found in the "Chocolate-strings-sv.xml" file:

 

  <Cast>Rollista...</Cast>
  <Scenes>Scener...</Scenes>

and this translation is not picked up at all:

 

5399769d116ac_Namnls.png

 
 
and finally, "Resume" is not found in either file.
 
So:
  1. Is there a guideline/schema for which strings go where and what their definitions are?
  2. Can I add missing strings myself, and if so where are they defined and where do I put them?
Link to comment
Share on other sites

Cheesegeezer

The thing with themes is there can be a lot of custom strings built into a theme, hence why there are theme specific strings, which you can alter yourself and should give you full control, certainly when it comes to theme specific options.

 

I haven't really got into my custom string labelling yet, most are hard coded at the minute in Xenon. I will implement it tho, but would like to make it as painless as possible for the user.

 

Maybe @@ebr can shed some light.

Link to comment
Share on other sites

Cheesegeezer

Have you tried to up the Version number by 1, this should trigger the change for the new strings.  in the xml file. It can be found at the bottom of the xml.

 

if it's at 1.0.0.8 change to 1.0.0.9 

 

<FileName>
  </FileName>
  <Version>1.008</Version>
Link to comment
Share on other sites

That sounds logical but the way the strings are loaded and the time that they are loaded doesn't provide for control of exactly which version you will see.  So you have to hunt a bit.  Also, if you have multiple themes installed, one of the themes you aren't using could be overriding some of those strings.  Just depending on the order in which the plug-ins were loaded by the system.

 

For Chocolate, you are looking for "Cast" and "Scenes" in the Chocolate strings file.  But be sure those same strings don't also exist in some other theme strings file for a theme you may also have installed.

Link to comment
Share on other sites

politby

In the case of "Cast" and "Scenes" I did change them in the chocolate-strings file, but they aren't loaded. And they are not in any other file.

 

Sent from my Nexus 4 using Tapatalk

Link to comment
Share on other sites

Cheesegeezer

@@ebr, out of interest.....

 

Lets say I'm german for a moment and in MBS i have set my locale to german and lang set to german. Will MBC look for the chocolate-string-ger.xml (or whatever abbr is gor germany) file for its strings?

Link to comment
Share on other sites

@@ebr, out of interest.....

 

Lets say I'm german for a moment and in MBS i have set my locale to german and lang set to german. Will MBC look for the chocolate-string-ger.xml (or whatever abbr is gor germany) file for its strings?

 

No.  It uses the Windows language settings.

Link to comment
Share on other sites

Cheesegeezer

No.  It uses the Windows language settings.

Ah ok, thats cool then. Thanks

Link to comment
Share on other sites

politby

I've done some more testing.

 

My "strings-sv.xml"  file is being loaded, any translations in that file are visible in MBC.

 

My "Chocolate-strings-sv.xml" file is not having any effect.

 

Both files are loaded, though, according to the log (snippet below):

Using String Data from C:\ProgramData\MediaBrowser-Classic\Localization\Chocolate-strings-sv.xml,1,Application

Using String Data from C:\ProgramData\MediaBrowser-Classic\Localization\strings-sv.xml,1,Application

E.g. on the EHS, the words on the tab where you toggle between  Unwatched, Latest, and Watched, are present in both strings-xx.xml and Chocolate-strings-xx.xml. I translated all three in both files, but only the translation of "Watched" shows up. The other two are not changed. Most likely because "Watched" takes its translation from "strings" and the other 2 from "Chocolate-strings". No other localization files are present in the directory.

 

I also experimented with changing my locale to US and making changes to the -en.xml file but it still didn't have any effect.

 

539c3641f29b3_Namnls.png

 

539c32d9c7d22_Namnls.png

 

So something is amiss here.

 

 

EDIT: I just found my Chocolate-strings-sv.xml is still being overwritten with the English version as soon as MBC starts, no matter what version number I put in it. Making it write protected results in an "invalid application" error.

 

The suggestion from this post did not help.

 

What gives?

MBClassic-1462014eb37d2b504bf4756bf322ea2ffc4090d.log

Edited by politby
Link to comment
Share on other sites

politby

Okay, when you say bug do you mean the overwriting of the file, the non-appearance of the translated strings, or both?

Are they easy to fix, I.e. can you give an ETA?

 

Many thanks

 

Sent from my Nexus 4 using Tapatalk

Link to comment
Share on other sites

The two are related.

 

I don't know an eta as I haven't even looked at it yet.  I won't be able to for a few days.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...
AlwinHummels

Any progress on this? I have the same issue the translated chocolate string file will be overwritten in english time after time.

Link to comment
Share on other sites

AlwinHummels

Did add this but no luck. take your time to fix this. I can read English too :P

Edited by AlwinHummels
Link to comment
Share on other sites

AlwinHummels

Here is my translation. It's not ready but for so far it won't show up on MBC and it will be replaced by english strings time after time.

 

hope you can fix this some day, but no hurry I like MB the way it is now ;-)

<?xml version="1.0" encoding="UTF-8"?>
<Settings>
  <ACTOR>ACTEUR</ACTOR>
  <Cast>Cast...</Cast>
  <Scenes>Scenes...</Scenes>
  <Album>Album</Album>
  <AlwaysShowPoster>Poster altijd tonen</AlwaysShowPoster>
  <AlwaysShowPosterDesc>Bij gebruik van niet-breedbeeldschermen, zijn posters uitgeschakeld op sommige schermen, deze optie dwingt tonem van posters af.</AlwaysShowPosterDesc>
  <Artist>Artiest</Artist>
  <AUDIO>AUDIO</AUDIO>
  <BACKDROP>ACHTERGROND</BACKDROP>
  <BackdropFill>Achtergrond Opvullen</BackdropFill>
  <BackdropFit>Achtergrond Aanpassen</BackdropFit>
  <BackdropStretch>Achtergrond Spreiden</BackdropStretch>
  <BANNERS>BANNERS</BANNERS>
  <ChocolateOptionsDesc>Opties voor het Chocolate Thema.</ChocolateOptionsDesc>
  <CLOSE>SLUITEN</CLOSE>
  <Company>Bedrijf</Company>
  <CONFIG>CONFIG</CONFIG>
  <COVERFLOW>HOESWEERGAVE</COVERFLOW>
  <CPU>CPU</CPU>
  <DATE>DATUM</DATE>
  <DECREASESIZE>- GROOTTE</DECREASESIZE>
  <Director>Regisseur</Director>
  <DIRECTOR>REGISEUR</DIRECTOR>
  <DisableEHSMovieTitle>Toon geselecteerde Titel</DisableEHSMovieTitle>
  <DisableEHSMovieTitleDesc>Deze Optie toont de Titel op het UBS</DisableEHSMovieTitleDesc>
  <Duration>Duur</Duration>
  <Enable24hr>Gebruik 24 Uurs Formaat</Enable24hr>
  <Enable24hrDesc>Klolk en Eind Tijd gebruiken 24 uurs formaat.</Enable24hrDesc>
  <EnableEHSBackdrop>Toon Achtergrondafbeeldingen van Recente Items</EnableEHSBackdrop>
  <EnableEHSBackdropDesc>De achtergrond op de UBS roteert door de achtergronden van de recente items van de geselecteerde map.</EnableEHSBackdropDesc>
  <EnableFolderBackdrop>Map Achtergrond</EnableFolderBackdrop>
  <EnableFolderBackdropDesc>Hiermee voegt u een map achtergrond laag tussen Fan Art en eerste mapachtergrond.</EnableFolderBackdropDesc>
  <EnableStripBackdrop>Strook Achtergrond</EnableStripBackdrop>
  <EnableStripBackdropDesc>De achtergronden in de Stook weergave worden vertoond als dia's (heen & terug) met de navigatie.</EnableStripBackdropDesc>
  <EnableVideoBackdrop>Toon Video Achtergrond *</EnableVideoBackdrop>
  <EnableVideoBackdropDesc>Vervang achtergrondafbeelding met de video die op dat moment wordt afgespeeld. Dit zal pas werken nadat Media Browser is herstart.</EnableVideoBackdropDesc>
  <Ends>Eindtijd</Ends>
  <ENDS>EINDTIJD</ENDS>
  <Episodes>Afleveringen</Episodes>
  <FILTER>FILTER</FILTER>
  <INDEX>INDEX</INDEX>
  <GENRE>GENRE</GENRE>
  <Genres>Genres</Genres>
  <GPU>GPU</GPU>
  <INCREASESIZE>+ GROOTTE</INCREASESIZE>
  <LABELS>LABELS</LABELS>
  <Latest>Nieuwste</Latest>
  <LIST>LIJST</LIST>
  <MaintainBackdropAR>Achtergrond Positie</MaintainBackdropAR>
  <MaintainBackdropARDesc>Spreiden aanbevolen voor niet-breedbeeld achtergronden.</MaintainBackdropARDesc>
  <NAME>NAAM</NAME>
  <NONE>GEEN</NONE>
  <NPVAR>NAV Schaal</NPVAR>
  <NPVARDesc>NAV naar dubbele of driedubbele normale grootte instellen </NPVARDesc>
  <PLAYALL>ALLES AFSPELEN</PLAYALL>
  <Players>Spelers</Players>
  <PLAYRANDOM>WILLEKEURIG AFSPELEN</PLAYRANDOM>
  <PLAYUNWATCHED>NOG NIET BEKEKEN AFSPELEN</PLAYUNWATCHED>
  <POSTER>POSTER</POSTER>
  <QUEUEALL>ALLES IN WACHTRIJ PLAATSEN</QUEUEALL>
  <RATING>CLASSIFICATIE</RATING>
  <Released>Uitgebracht</Released>
  <RESO>RESO</RESO>
  <Runs>Runs</Runs>
  <RUNS>RUNS</RUNS>
  <RUNTIME>SPEELDUUR</RUNTIME>
  <Seasons>SEIZOENEN</Seasons>
  <ShowConfig>Toon Configuratie Knop</ShowConfig>
  <ShowConfigDesc>Toon configuratie knop op alle niveaus van MediaBrowser</ShowConfigDesc>
  <ShowCoverflowIndicator>Toon Bekeken Indicator</ShowCoverflowIndicator>
  <ShowCoverflowIndicatorDesc>Deze optie toont een Bekeken Indicator op de Hoesweergave</ShowCoverflowIndicatorDesc>
  <ShowCoverFlowDetails>Show Details</ShowCoverFlowDetails>
  <ShowCoverFlowDetailsDesc>Toon Details voor het geselecteerde item in de Hoesweergave.</ShowCoverFlowDetailsDesc>
  <ShowCoverflowPosterOverlay>Toon Poster Bodem</ShowCoverflowPosterOverlay>
  <ShowCoverflowPosterOverlayDesc>Deze Optie toont een 'Bodem' Onder de Posters in de Hoesweergave</ShowCoverflowPosterOverlayDesc>
  <ShowCoverFlowTitle>Toon Item Titel In de Hoesweergave</ShowCoverFlowTitle>
  <ShowCoverFlowTitleDesc>Deze Optie toont een titelaanduiding in de Hoesweergave</ShowCoverFlowTitleDesc>
  <ShowCoverflowTotalNumber>Toon Totaal Aantal</ShowCoverflowTotalNumber>
  <ShowCoverflowTotalNumberDesc>Deze Optie toont Het Totaal Aantal Items binnen de de Hoesweergave</ShowCoverflowTotalNumberDesc>
  <ShowListBackground>Toon Lijst Achtergrond</ShowListBackground>
  <ShowListBackgroundDesc>Een donkere achtergrond onder de lijst weergeven. Zou slechts alleen nodig zijn bij vreemde scherm groottes.</ShowListBackgroundDesc>
  <ShowInfoIcons>Toon Info Pictogrammen</ShowInfoIcons>
  <ShowLegend>Toon sneltoets legenda  </ShowLegend>
  <ShowLegendDesc>Toon een Legenda van beschikbare sneltoetsen wanneer configurati menu in focus is</ShowLegendDesc>
  <ShowInfoIconsBackgrounds>Toon Info Pictogram Achtergrond</ShowInfoIconsBackgrounds>
  <ShowInfoIconsBackgroundsDesc>Voegt semi-transparante achtergrond toe op Info Pictogrammen.</ShowInfoIconsBackgroundsDesc>
  <ShowInfoIconsDesc>Media Info symbolen worden weergegeven in verschillende weergaven.</ShowInfoIconsDesc>
  <ShowLogosOnMovieDetail>Toon Logos</ShowLogosOnMovieDetail>
  <ShowDiscDetail>Toon Schijf Afbeeldingen</ShowDiscDetail>
  <ShowDiscDetailDesc>Een Schijfafbeelding bovenop de Poster in de detailweergave tonen</ShowDiscDetailDesc>
  <ShowLogosOnMovieDetailDesc>Toon een Logo-afbeelding, wanneer beschikbaar, op het film Detail scherm.</ShowLogosOnMovieDetailDesc>
  <ShowNowPlayingIcon>Toon nu afspelen pictogram</ShowNowPlayingIcon>
  <ShowNowPlayingIconDesc>Nu afspelen pictogram weergeven op de detailpagina</ShowNowPlayingIconDesc>
  <ShowNPV>Toon kleine NAV</ShowNPV>
  <ShowNPVDesc>Kleine NAV op de detailpagina weergeven</ShowNPVDesc>
  <ShowPosterEndTime>Toon Eind Tijd</ShowPosterEndTime>
  <ShowPosterEndTimeDesc>Deze Optie toont de Eind Tijd Op de Poster weergave.</ShowPosterEndTimeDesc>
  <ShowPosterLogos>Toon logo's</ShowPosterLogos>
  <ShowPosterLogosDesc>Toon logo's op Poster weergave.</ShowPosterLogosDesc>
  <ShowPosterInfo>Toon Info-Box  </ShowPosterInfo>
  <ShowPosterInfoDesc>Toon een informatievak voor het geselecteerde Item in de Poster weergave.</ShowPosterInfoDesc>
  <ShowStripLogos>Toon logo's</ShowStripLogos>
  <ShowStripLogosDesc>Toon logo's op de Stook weergave.</ShowStripLogosDesc>
  <ShowEndTime>Toon Eind Tijd</ShowEndTime>
  <ShowEndTimeDesc>Toon de Eindtijd van het geselecteerde item wanneer u het Nu zou starten.</ShowEndTimeDesc>
  <ShowLogos>Toon logo's</ShowLogos>
  <ShowLogosDesc>Toon Item Logo's in Deze Weergave.</ShowLogosDesc>
  <ShowWeather>Toon Weer Paneel</ShowWeather>
  <ShowWeatherDesc>Toon Weer Informatie op UBS. Vereist configuratie op de server.</ShowWeatherDesc>
  <UseCustomTvView>Gebruik aangepaste weergave voor Series</UseCustomTvView>
  <UseCustomTvViewDesc>Toont TV-serie in een speciale weergave alle seizoenen en afleveringen worden op één schermweergeven</UseCustomTvViewDesc>
  <SmallEhs>Kleinere Recente Lijst afbeeldingen</SmallEhs>
  <SmallEhsDesc>Iets kleinere afbeeldingen in de recente lijst op UBS  weergeven.</SmallEhsDesc>
  <SpecialFeatures>Specials...</SpecialFeatures>
  <SORT>SOORT</SORT>
  <STRIP>STROOK</STRIP>
  <StripviewExpandedDesc>Instellen of de Strook weergave standaard zal worden uitgevouwen.</StripviewExpandedDesc>
  <STUDIO>STUDIO</STUDIO>
  <SUBTITLES>ONDERTITELS : </SUBTITLES>
  <SubsDetail>Ondertitels: </SubsDetail>
  <Synopsis>Samenvatting</Synopsis>
  <ThemeCustomFont>* Kies thema lettertypestijl</ThemeCustomFont>
  <ThemeCustomFontDesc>Chose which font file to use with the theme. Deze Won't Take Effect Until Media Browser Restarted.</ThemeCustomFontDesc>
  <THUMB>MINIATUUR</THUMB>
  <Unwatched>Onbekeken</Unwatched>
  <UNWATCHED>ONBEKEKEN</UNWATCHED>
  <UseSeasonPoster>Gebruik Seizoen Poster in Recent Lijst</UseSeasonPoster>
  <UseSeasonPosterDesc>Vervang aflevering miniaturen door seizoen posters op de UBS (Uitgebreid Beginscherm).</UseSeasonPosterDesc>
  <VERTSCROLL>VERT SCROLL</VERTSCROLL>
  <VIDEO>VIDEO</VIDEO>
  <VIEW>WERGAVE</VIEW>
  <Watched>Bekeken</Watched>
  <Year>Jaar</Year>
  <YEAR>JAAR</YEAR>
  <ConfirmExit>Weet u zeker dat u wilt afsluiten?</ConfirmExit>
  <InProgressEHS>Vooruitgang</InProgressEHS>
  <FileName>
  </FileName>
  <Version>1.0001</Version>
</Settings>
Edited by AlwinHummels
Link to comment
Share on other sites

Okay, there are two problems with the data in your xml:

 

  1. One of your descriptions contains an ampersand (&).  That is a special character in xml so you have to escape it.  Replace it with '&'
  2. Another of your descriptions contains characters that are not valid for UTF-8 encoding.  Change your encoding in the first line to 'ISO-8859-1'
Link to comment
Share on other sites

AlwinHummels

Wow never thought it was so simple to solve
Thank you very much for your help, now it works properly.

Just one little bug on the strings-nl.xml
when I modify line 345

  <NoneDispPref>None</NoneDispPref>

to

  <NoneDispPref>Geen</NoneDispPref>

MBC wont start anymore when I change that line back it works again. No idea why.

 

I also saw there are a lot of unused strings from a earlier version of MB.

for example all the strings with the parental control are not used anymore imo those are on the server now.

Edited by AlwinHummels
Link to comment
Share on other sites

Yeah, there are one or two items that simply cannot be localized because we use them as defaults very early in initialization.  I've got an open issue on this but have not been able to work out a fix.

 

As for the unused items, yes there are a bunch of them.  I haven't tried to remove them because I don't want to break any themes that might be referencing them.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...