Working on localization

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@208 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2010-12-28 13:53:32 +00:00
parent 8977b2d873
commit e18f350936
5 changed files with 29 additions and 7 deletions

View File

@ -7382,7 +7382,7 @@ namespace Nikse.SubtitleEdit.Forms
} }
catch (Exception exception) catch (Exception exception)
{ {
MessageBox.Show("Unable to connect to server: " + exception.Message); MessageBox.Show(string.Format(_language.NetworkUnableToConnectToServer, exception.Message));
_networkSession.TimerStop(); _networkSession.TimerStop();
if (_networkChat != null && !_networkChat.IsDisposed) if (_networkChat != null && !_networkChat.IsDisposed)
{ {
@ -7419,7 +7419,7 @@ namespace Nikse.SubtitleEdit.Forms
{ {
_networkChat.AddUser(update.User); _networkChat.AddUser(update.User);
} }
_networkSession.AppendToLog("New user: " + update.User.UserName + " (" + update.User.Ip + ")"); _networkSession.AppendToLog(string.Format(_language.NetworkNewUser, update.User.UserName, update.User.Ip ));
} }
else if (update.Action == "MSG") else if (update.Action == "MSG")
{ {
@ -7434,7 +7434,7 @@ namespace Nikse.SubtitleEdit.Forms
{ {
_networkChat.AddChatMessage(update.User, update.Text); _networkChat.AddChatMessage(update.User, update.Text);
} }
_networkSession.AppendToLog("Message: " + update.User.UserName + " (" + update.User.Ip + "): " + update.Text); _networkSession.AppendToLog(string.Format(_language.NetworkMessage, update.User.UserName, update.User.Ip, update.Text));
} }
else if (update.Action == "DEL") else if (update.Action == "DEL")
{ {
@ -7442,7 +7442,7 @@ namespace Nikse.SubtitleEdit.Forms
_subtitle.Paragraphs.RemoveAt(update.Index); _subtitle.Paragraphs.RemoveAt(update.Index);
if (_networkSession.LastSubtitle != null) if (_networkSession.LastSubtitle != null)
_networkSession.LastSubtitle.Paragraphs.RemoveAt(update.Index); _networkSession.LastSubtitle.Paragraphs.RemoveAt(update.Index);
_networkSession.AppendToLog("Delete: " + update.User.UserName + " (" + update.User.Ip + "): Index=" + update.Index.ToString()); _networkSession.AppendToLog(string.Format(_language.NetworkDelete, update.User.UserName , update.User.Ip, update.Index.ToString()));
_networkSession.AdjustUpdateLogToDelete(update.Index); _networkSession.AdjustUpdateLogToDelete(update.Index);
_change = true; _change = true;
@ -7470,7 +7470,7 @@ namespace Nikse.SubtitleEdit.Forms
_subtitle.Paragraphs.Insert(update.Index, p); _subtitle.Paragraphs.Insert(update.Index, p);
if (_networkSession.LastSubtitle != null) if (_networkSession.LastSubtitle != null)
_networkSession.LastSubtitle.Paragraphs.Insert(update.Index, new Paragraph(p)); _networkSession.LastSubtitle.Paragraphs.Insert(update.Index, new Paragraph(p));
_networkSession.AppendToLog("Insert: " + update.User.UserName + " (" + update.User.Ip + "): Index=" + update.Index.ToString() + ", Text=" + update.Text.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString)); _networkSession.AppendToLog(string.Format(_language.NetworkInsert, update.User.UserName, update.User.Ip, update.Index.ToString(), update.Text.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString)));
_networkSession.AddToWsUserLog(update.User, update.Index, update.Action, false); _networkSession.AddToWsUserLog(update.User, update.Index, update.Action, false);
updateListViewStatus = true; updateListViewStatus = true;
_networkSession.AdjustUpdateLogToInsert(update.Index); _networkSession.AdjustUpdateLogToInsert(update.Index);
@ -7500,6 +7500,7 @@ namespace Nikse.SubtitleEdit.Forms
p.EndTime.TotalMilliseconds = update.EndMilliseconds; p.EndTime.TotalMilliseconds = update.EndMilliseconds;
p.Text = update.Text; p.Text = update.Text;
SubtitleListview1.SetTimeAndText(update.Index, p); SubtitleListview1.SetTimeAndText(update.Index, p);
_networkSession.AppendToLog(string.Format(_language.NetworkUpdate, update.User.UserName, update.User.Ip, update.Index.ToString(), update.Text.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString)));
_networkSession.AddToWsUserLog(update.User, update.Index, update.Action, true); _networkSession.AddToWsUserLog(update.User, update.Index, update.Action, true);
updateListViewStatus = true; updateListViewStatus = true;
} }
@ -7532,7 +7533,7 @@ namespace Nikse.SubtitleEdit.Forms
if (removeUser != null) if (removeUser != null)
_networkSession.Users.Remove(removeUser); _networkSession.Users.Remove(removeUser);
_networkSession.AppendToLog("Bye: " + update.User.UserName + " (" + update.User.Ip + ")"); _networkSession.AppendToLog(string.Format(_language.NetworkByeUser, update.User.UserName, update.User.Ip));
} }
else else
{ {

View File

@ -68,7 +68,7 @@ namespace Nikse.SubtitleEdit.Logic
General = new LanguageStructure.General General = new LanguageStructure.General
{ {
Title = "Subtitle Edit", Title = "Subtitle Edit",
Version = "3.0", Version = "3.1",
TranslatedBy = "", TranslatedBy = "",
CultureName = "en-US", CultureName = "en-US",
OK = "&OK", OK = "&OK",
@ -645,6 +645,13 @@ namespace Nikse.SubtitleEdit.Logic
BeforeSetStartTimeAndOffsetTheRest = "Before set start time and offset the rest", BeforeSetStartTimeAndOffsetTheRest = "Before set start time and offset the rest",
ContinueWithCurrentSpellCheck = "Continue with current spell check?", ContinueWithCurrentSpellCheck = "Continue with current spell check?",
CharactersPerSecond = "Chars/sec: {0:0.00}", CharactersPerSecond = "Chars/sec: {0:0.00}",
NetworkMessage = "New message: {0} ({1}): {2}",
NetworkUpdate = "Line updated: {0} ({1}): Index={2}, Text={3}",
NetworkInsert = "Line inserted: {0} ({1}): Index={2}, Text={3}",
NetworkDelete = "Line deleted: {0} ({1}): Index={2}",
NetworkNewUser = "New user: {0} ({1})",
NetworkByeUser = "Bye {0} ({1})",
NetworkUnableToConnectToServer = "Unable to connect to server: {0}",
Menu = new LanguageStructure.Main.MainMenu Menu = new LanguageStructure.Main.MainMenu
{ {

View File

@ -574,6 +574,13 @@
public string BeforeSetStartTimeAndOffsetTheRest { get; set; } public string BeforeSetStartTimeAndOffsetTheRest { get; set; }
public string ContinueWithCurrentSpellCheck { get; set; } public string ContinueWithCurrentSpellCheck { get; set; }
public string CharactersPerSecond { get; set; } public string CharactersPerSecond { get; set; }
public string NetworkMessage { get; set; }
public string NetworkUpdate { get; set; }
public string NetworkInsert { get; set; }
public string NetworkDelete { get; set; }
public string NetworkNewUser { get; set; }
public string NetworkByeUser { get; set; }
public string NetworkUnableToConnectToServer { get; set; }
public class MainMenu public class MainMenu
{ {

View File

@ -725,6 +725,13 @@ Fortsæt?</SubtitleAppendPrompt>
<BeforeSetStartTimeAndOffsetTheRest>Før sæt start tid og juster resten</BeforeSetStartTimeAndOffsetTheRest> <BeforeSetStartTimeAndOffsetTheRest>Før sæt start tid og juster resten</BeforeSetStartTimeAndOffsetTheRest>
<ContinueWithCurrentSpellCheck>Fortsæt med aktuelle stavekontrol?</ContinueWithCurrentSpellCheck> <ContinueWithCurrentSpellCheck>Fortsæt med aktuelle stavekontrol?</ContinueWithCurrentSpellCheck>
<CharactersPerSecond>Bogstav/sek: {0:0.00}</CharactersPerSecond> <CharactersPerSecond>Bogstav/sek: {0:0.00}</CharactersPerSecond>
<NetworkMessage>Ny meddelelse: {0} ({1}): {2}</NetworkMessage>
<NetworkUpdate>Linje opdateret: {0} ({1}): Indeks = {2}, Tekst = {3}</NetworkUpdate>
<NetworkInsert>Linje indsat: {0} ({1}): Indeks = {2}, Tekst = {3}</NetworkInsert>
<NetworkDelete>Linje slettet: {0} ({1}): Indeks = {2}</NetworkDelete>
<NetworkNewUser>Ny bruger: {0} ({1})</NetworkNewUser>
<NetworkByeUser>Bye {0} ({1})</NetworkByeUser>
<NetworkUnableToConnectToServer>Stand til at forbinde til serveren: {0}</NetworkUnableToConnectToServer>
</Main> </Main>
<MatroskaSubtitleChooser> <MatroskaSubtitleChooser>
<Title>Vælg undertekst fra Matroska fil</Title> <Title>Vælg undertekst fra Matroska fil</Title>

Binary file not shown.