diff -rupN old//po/fi_FI.po new//po/fi_FI.po --- old//po/fi_FI.po 2012-05-02 13:44:12.000000000 +0300 +++ new//po/fi_FI.po 2012-05-02 13:40:03.000000000 +0300 @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ttxtsubs 0.2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-12-09 21:28+0200\n" +"POT-Creation-Date: 2012-05-02 13:28+0300\n" "PO-Revision-Date: 2007-08-24 23:49+0300\n" "Last-Translator: Rolf Ahrenberg \n" "Language-Team: Finnish \n" @@ -40,6 +40,15 @@ msgstr "4:3/Letterbox (käytöstä poist msgid "Page Mode" msgstr "sivun valinta" +msgid "Center" +msgstr "keskitetty" + +msgid "Left" +msgstr "vasen" + +msgid "Right" +msgstr "oikea" + msgid "Display Subtitles" msgstr "Näytä tekstitykset" @@ -58,6 +67,12 @@ msgstr "Kirjasintyypin koko (px)" msgid "Font OutlineWidth (pixel)" msgstr "Kirjasinreunuksen koko (px)" +msgid "Subtitles alignment" +msgstr "Tekstityksen tasaus" + +msgid "Workaround for some French chns" +msgstr "Ranskalainen silmänkääntötemppu" + msgid "Language" msgstr "Tekstityskieli" diff -rupN old//po/fr_FR.po new//po/fr_FR.po --- old//po/fr_FR.po 2012-05-02 13:44:19.000000000 +0300 +++ new//po/fr_FR.po 2012-05-02 13:40:03.000000000 +0300 @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-12-09 21:28+0200\n" +"POT-Creation-Date: 2012-05-02 13:28+0300\n" "PO-Revision-Date: 2010-02-28 14:43+0100\n" "Last-Translator: Nival Michaël\n" "Language-Team: French \n" @@ -43,6 +43,15 @@ msgstr "4:3/Letterbox (obsolète)" msgid "Page Mode" msgstr "Mode page" +msgid "Center" +msgstr "Centrée" + +msgid "Left" +msgstr "À gauche" + +msgid "Right" +msgstr "À droite" + msgid "Display Subtitles" msgstr "Afficher les sous-titre" @@ -61,6 +70,13 @@ msgstr "Taille Police (pixel)" msgid "Font OutlineWidth (pixel)" msgstr "Largeur contour (pixel)" +#, fuzzy +msgid "Subtitles alignment" +msgstr "Alignement des sous-titres" + +msgid "Workaround for some French chns" +msgstr "Contournement chaînes françaises" + msgid "Language" msgstr "Langues" diff -rupN old//ttxtsubs.c new//ttxtsubs.c --- old//ttxtsubs.c 2012-05-02 12:16:59.000000000 +0300 +++ new//ttxtsubs.c 2012-04-27 16:30:43.000000000 +0300 @@ -321,6 +321,8 @@ bool cPluginTtxtsubs::SetupParse(const c else if(!strcasecmp(Name, "MainMenuEntry")) globals.mMainMenuEntry = atoi(Value); else if(!strcasecmp(Name, "FontSize")) globals.mFontSize = atoi(Value); else if(!strcasecmp(Name, "OutlineWidth")) globals.mOutlineWidth = atoi(Value); + else if(!strcasecmp(Name, "Justification")) globals.mJustification = atoi(Value); + else if(!strcasecmp(Name, "FrenchSpecial")) globals.mFrenchSpecial = atoi(Value); else if(!strcasecmp(Name, "Languages")) parseLanguages(Value); else if(!strcasecmp(Name, "HearingImpaireds")) parseHIs(Value); // Handle old settings @@ -487,6 +489,7 @@ void cMenuSetupTtxtsubsLanguages::Store( } const char * mainMenuAlts[5] = {NULL, NULL, NULL, NULL, NULL}; +const char * justificationAlts[3] = {NULL, NULL, NULL}; cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore) : @@ -504,6 +507,12 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(c mainMenuAlts[4] = NULL; } const int numMainMenuAlts = sizeof(mainMenuAlts) / sizeof(mainMenuAlts[0]) - 1; + if(justificationAlts[0] == NULL) { + justificationAlts[0] = tr("Center"); + justificationAlts[1] = tr("Left"); + justificationAlts[2] = tr("Right"); + } + const int numJustificationAlts = sizeof(justificationAlts) / sizeof(justificationAlts[0]); for(int n = 0; n < MAXLANGUAGES; n++) { mLanguageNo[n] = -1; @@ -527,6 +536,8 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(c numMainMenuAlts, mainMenuAlts)); Add(new cMenuEditIntItem(tr("Font Size (pixel)"), &mConf.mFontSize, 10, MAXFONTSIZE * 2)); Add(new cMenuEditIntItem(tr("Font OutlineWidth (pixel)"), &mConf.mOutlineWidth, 1, 10)); + Add(new cMenuEditStraItem(tr("Subtitles justification"), &mConf.mJustification, numJustificationAlts, justificationAlts)); + Add(new cMenuEditBoolItem(tr("Workaround for some French chns"), &mConf.mFrenchSpecial)); for(int n = 0; n < MAXLANGUAGES; n++) { char str[100]; @@ -583,6 +594,8 @@ void cMenuSetupTtxtsubs::Store(void) SetupStore("MainMenuEntry", mConf.mMainMenuEntry); SetupStore("FontSize", mConf.mFontSize); SetupStore("OutlineWidth", mConf.mOutlineWidth); + SetupStore("Justification", mConf.mJustification); + SetupStore("FrenchSpecial", mConf.mFrenchSpecial); char lstr[MAXLANGUAGES*2*4 + 1]; char histr[MAXLANGUAGES*2 + 1]; diff -rupN old//ttxtsubsdisplay.c new//ttxtsubsdisplay.c --- old//ttxtsubsdisplay.c 2012-05-02 12:17:18.000000000 +0300 +++ new//ttxtsubsdisplay.c 2012-04-27 15:01:33.000000000 +0300 @@ -437,7 +437,18 @@ void cTtxtSubsDisplay::ShowOSD(void) { int lineWidth = _osdFont->Width(_subTitleTextLines[textLineIndex].text) + 2 * globals.mOutlineWidth + 5; int lineHeight = (textHeight / _numberOfSubTitleTextLines); - int x = (width - lineWidth) / 2; + int x; + switch(globals.mJustification) { + case 1: //left justified + x = globals.mOutlineWidth; // to fit the outline on the screen! + break; + case 2: //right justified + x = width - (lineWidth + globals.mOutlineWidth); + break; + default: //centered + x = (width - lineWidth) / 2; + break; + } int y = lineHeight * textLineIndex + globals.mOutlineWidth + 5; tColor foregroundColor = SubtitleColorMap[_subTitleTextLines[textLineIndex].color][0]; tColor outlineColor = SubtitleColorMap[_subTitleTextLines[textLineIndex].color][1]; diff -rupN old//ttxtsubsdisplayer.c new//ttxtsubsdisplayer.c --- old//ttxtsubsdisplayer.c 2012-05-02 12:17:27.000000000 +0300 +++ new//ttxtsubsdisplayer.c 2012-04-27 14:57:07.000000000 +0300 @@ -234,14 +234,11 @@ void cTtxtSubsPlayer::SearchLanguagePage bool cTtxtSubsPlayer::SetPreferredPage(const char* language, bool hearingImpaired, unsigned int bcdPage) { // Some French channels still send wrong subtitle page number! - // This is a hard fix to change the page numbers 05x to 08x - // According to ETSI tables pages 850-859 are not used for - // teletext subtitles in any country, so we assume, that these can - // safely be mapped to 880-889 - - if(bcdPage >= 0x50 && bcdPage <= 0x59) - bcdPage += 0x30; - + // This is a fix to change the page numbers 05x to 08x + if(globals.frenchSpecial()) { + if(bcdPage >= 0x50 && bcdPage <= 0x59) + bcdPage += 0x30; + } int ch = globals.langChoise(language, hearingImpaired); if (ch >= 0 && ch < mLangChoise) { mLangChoise = ch; diff -rupN old//ttxtsubsglobals.h new//ttxtsubsglobals.h --- old//ttxtsubsglobals.h 2012-05-02 12:17:46.000000000 +0300 +++ new//ttxtsubsglobals.h 2012-04-27 14:51:18.000000000 +0300 @@ -40,6 +40,8 @@ class cTtxtsubsConf { mMainMenuEntry(0), mFontSize(20), mOutlineWidth(2), + mJustification(1), + mFrenchSpecial(0), mReplayDelay(0), mReplayTsDelay(0) { @@ -52,6 +54,8 @@ class cTtxtsubsConf { int mainMenuEntry(void) {return mMainMenuEntry;} int fontSize(void) {return mFontSize;} int outlineWidth(void) {return mOutlineWidth;} + int justification(void) {return mJustification;} + int frenchSpecial(void) {return mFrenchSpecial;} char (*languages(void))[MAXLANGUAGES][2][4] {return &mLanguages;} int (*hearingImpaireds(void))[MAXLANGUAGES][2] {return &mHearingImpaireds;} @@ -65,6 +69,8 @@ class cTtxtsubsConf { int mMainMenuEntry; int mFontSize; int mOutlineWidth; + int mJustification; + int mFrenchSpecial; char mLanguages[MAXLANGUAGES][2][4]; int mHearingImpaireds[MAXLANGUAGES][2]; int mReplayDelay;