Project

General

Profile

Feature #957 » french-2.patch

JTe, 05/03/2012 10:02 AM

View differences:

new//po/fi_FI.po 2012-05-02 13:40:03.000000000 +0300
msgstr ""
"Project-Id-Version: ttxtsubs 0.2.0\n"
"Report-Msgid-Bugs-To: <author>\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 <rahrenbe@cc.hut.fi>\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
......
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"
......
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"
new//po/fr_FR.po 2012-05-02 13:40:03.000000000 +0300
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <author>\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 <vdr@linuxtv.org>\n"
......
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"
......
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"
new//ttxtsubs.c 2012-04-27 16:30:43.000000000 +0300
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
......
}
const char * mainMenuAlts[5] = {NULL, NULL, NULL, NULL, NULL};
const char * justificationAlts[3] = {NULL, NULL, NULL};
cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
:
......
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;
......
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 alignment"), &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];
......
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];
new//ttxtsubsdisplay.c 2012-04-27 15:01:33.000000000 +0300
{
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];
new//ttxtsubsdisplayer.c 2012-04-27 14:57:07.000000000 +0300
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;
new//ttxtsubsglobals.h 2012-04-27 14:51:18.000000000 +0300
mMainMenuEntry(0),
mFontSize(20),
mOutlineWidth(2),
mJustification(1),
mFrenchSpecial(0),
mReplayDelay(0),
mReplayTsDelay(0)
{
......
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;}
......
int mMainMenuEntry;
int mFontSize;
int mOutlineWidth;
int mJustification;
int mFrenchSpecial;
char mLanguages[MAXLANGUAGES][2][4];
int mHearingImpaireds[MAXLANGUAGES][2];
int mReplayDelay;
(2-2/2)