From 1147017d926ec89f7b37cd03b338a945734f2ae9 Mon Sep 17 00:00:00 2001 From: Dario Solera Date: Tue, 10 Nov 2009 07:59:28 +0000 Subject: [PATCH] Fixed and closed #414: "Link to this section" is now translated. Fixed and closed #413: "~~~~" tag now correctly renders the display name. Fixed #408: reverse formatter now works even when no new lines are present at the end of the content. --- AssemblyVersion.cs | 4 ++-- Core/Formatter.cs | 13 +++++++------ Core/ReverseFormatter.cs | 1 + .../App_LocalResources/Edit.aspx.it-IT.resx | 4 ++-- .../App_LocalResources/Register.aspx.cs-CZ.resx | 2 +- .../App_LocalResources/Register.aspx.da-DK.resx | 2 +- .../App_LocalResources/Register.aspx.de-DE.resx | 2 +- .../App_LocalResources/Register.aspx.fr-FR.resx | 2 +- .../App_LocalResources/Register.aspx.hu-HU.resx | 2 +- .../App_LocalResources/Register.aspx.it-IT.resx | 4 ++-- .../App_LocalResources/Register.aspx.nb-NO.resx | 2 +- .../App_LocalResources/Register.aspx.nl-NL.resx | 2 +- .../App_LocalResources/Register.aspx.pl-PL.resx | 2 +- .../App_LocalResources/Register.aspx.pt-BR.resx | 2 +- .../App_LocalResources/Register.aspx.resx | 2 +- .../App_LocalResources/Register.aspx.ro-RO.resx | 2 +- .../App_LocalResources/Register.aspx.ru-RU.resx | 2 +- .../App_LocalResources/Register.aspx.sk-SK.resx | 2 +- .../Register.aspx.sr-Latn-CS.resx | 2 +- .../App_LocalResources/Register.aspx.tr-TR.resx | 2 +- .../App_LocalResources/Register.aspx.uk-UA.resx | 2 +- .../App_LocalResources/Register.aspx.zh-cn.resx | 2 +- .../App_LocalResources/Register.aspx.zh-tw.resx | 2 +- WebApplication/Register.aspx | 2 +- WebApplication/Register.aspx.designer.cs | 2 +- 25 files changed, 34 insertions(+), 32 deletions(-) diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index bd0687b..83e1e52 100644 --- a/AssemblyVersion.cs +++ b/AssemblyVersion.cs @@ -16,5 +16,5 @@ using System.Reflection; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("3.0.1.425")] -[assembly: AssemblyFileVersion("3.0.1.425")] +[assembly: AssemblyVersion("3.0.1.426")] +[assembly: AssemblyFileVersion("3.0.1.426")] diff --git a/Core/Formatter.cs b/Core/Formatter.cs index 8111be6..ed35375 100644 --- a/Core/Formatter.cs +++ b/Core/Formatter.cs @@ -67,6 +67,7 @@ namespace ScrewTurn.Wiki { private const string ExtendedUpReplacement = "GetFile.aspx?$File="; private const string ExtendedUpReplacementForAttachment = "GetFile.aspx?$Page=@&File="; private const string SingleBrPlaceHolder = "%%%%SingleBrPlaceHolder%%%%"; + private const string SectionLinkTextPlaceHolder = "%%%%SectionLinkTextPlaceHolder%%%%"; /// /// Detects the current namespace. @@ -911,7 +912,7 @@ namespace ScrewTurn.Wiki { buffer.Append(@""" href=""#"); buffer.Append(id); buffer.Append(@""" title="""); - buffer.Append(Exchanger.ResourceExchanger.GetResource("LinkToThisSection")); + buffer.Append(SectionLinkTextPlaceHolder); if(Settings.EnableSectionAnchors) buffer.Append(@""">¶"); else buffer.Append(@""">"); } @@ -2401,6 +2402,8 @@ namespace ScrewTurn.Wiki { match = Phase3SpecialTagRegex.Match(sb.ToString()); } + sb.Replace(SectionLinkTextPlaceHolder, Exchanger.ResourceExchanger.GetResource("LinkToThisSection")); + match = RecentChangesRegex.Match(sb.ToString()); while(match.Success) { sb.Remove(match.Index, match.Length); @@ -2443,11 +2446,9 @@ namespace ScrewTurn.Wiki { int idx = txt.LastIndexOf(","); string[] fields = new string[] { txt.Substring(0, idx), txt.Substring(idx + 1) }; dummy = new StringBuilder(); - dummy.Append(@""); - dummy.Append(fields[0]); - dummy.Append(", "); + dummy.Append(@""); + dummy.Append(Users.UserLink(fields[0])); + dummy.Append(", "); dummy.Append(Preferences.AlignWithTimezone(DateTime.Parse(fields[1])).ToString(Settings.DateTimeFormat)); dummy.Append(""); sb.Insert(match.Index, dummy.ToString()); diff --git a/Core/ReverseFormatter.cs b/Core/ReverseFormatter.cs index b3709b1..3de90ac 100644 --- a/Core/ReverseFormatter.cs +++ b/Core/ReverseFormatter.cs @@ -81,6 +81,7 @@ namespace ScrewTurn.Wiki { Match match = null; StringBuilder buffer = new StringBuilder(html); + if(!html.EndsWith("\r\n")) buffer.Append("\r\n"); buffer.Replace("
", "
"); buffer.Replace("
", "
"); diff --git a/WebApplication/App_LocalResources/Edit.aspx.it-IT.resx b/WebApplication/App_LocalResources/Edit.aspx.it-IT.resx index 2ad2e44..6ebb788 100644 --- a/WebApplication/App_LocalResources/Edit.aspx.it-IT.resx +++ b/WebApplication/App_LocalResources/Edit.aspx.it-IT.resx @@ -256,7 +256,7 @@ - Le tue midifiche saranno salvate come bozza e non verranno pubblicate finchè un editore o amministratore non le avrà approvate. + Le tue modifiche saranno salvate come bozza e non verranno pubblicate finchè un editore o amministratore non le avrà approvate. Gestione allegati @@ -322,7 +322,7 @@ Salvare questa pagina potrebbe causare <b>perdite di dati</b>. - Gli amministratori non permettoni di salvare questa pagina. + Gli amministratori non permettono di salvare questa pagina. diff --git a/WebApplication/App_LocalResources/Register.aspx.cs-CZ.resx b/WebApplication/App_LocalResources/Register.aspx.cs-CZ.resx index ad5cd08..c8e6681 100644 --- a/WebApplication/App_LocalResources/Register.aspx.cs-CZ.resx +++ b/WebApplication/App_LocalResources/Register.aspx.cs-CZ.resx @@ -256,7 +256,7 @@ Uživatelské jméno již existuje - Kontrolní text (ohled na velikost písmen): + Kontrolní text (ohled na velikost písmen) Zobrazované jméno diff --git a/WebApplication/App_LocalResources/Register.aspx.da-DK.resx b/WebApplication/App_LocalResources/Register.aspx.da-DK.resx index e8a1a9c..cac12c4 100644 --- a/WebApplication/App_LocalResources/Register.aspx.da-DK.resx +++ b/WebApplication/App_LocalResources/Register.aspx.da-DK.resx @@ -271,7 +271,7 @@ Klik er for at oprette en konto - Kontrol tekst: + Kontrol tekst E-mail diff --git a/WebApplication/App_LocalResources/Register.aspx.de-DE.resx b/WebApplication/App_LocalResources/Register.aspx.de-DE.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.de-DE.resx +++ b/WebApplication/App_LocalResources/Register.aspx.de-DE.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.fr-FR.resx b/WebApplication/App_LocalResources/Register.aspx.fr-FR.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.fr-FR.resx +++ b/WebApplication/App_LocalResources/Register.aspx.fr-FR.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.hu-HU.resx b/WebApplication/App_LocalResources/Register.aspx.hu-HU.resx index ab4234d..2856161 100644 --- a/WebApplication/App_LocalResources/Register.aspx.hu-HU.resx +++ b/WebApplication/App_LocalResources/Register.aspx.hu-HU.resx @@ -172,7 +172,7 @@ - Ellenőrző szöveg (kis-nagybetű számít): + Ellenőrző szöveg (kis-nagybetű számít) Megjelenő név diff --git a/WebApplication/App_LocalResources/Register.aspx.it-IT.resx b/WebApplication/App_LocalResources/Register.aspx.it-IT.resx index ac249f7..7431826 100644 --- a/WebApplication/App_LocalResources/Register.aspx.it-IT.resx +++ b/WebApplication/App_LocalResources/Register.aspx.it-IT.resx @@ -172,10 +172,10 @@ - Testo di controllo (sensibile alle maiuscole): + Testo di controllo (sensibile alle maiuscole) - Nome visualizzato: + Nome visualizzato Email diff --git a/WebApplication/App_LocalResources/Register.aspx.nb-NO.resx b/WebApplication/App_LocalResources/Register.aspx.nb-NO.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.nb-NO.resx +++ b/WebApplication/App_LocalResources/Register.aspx.nb-NO.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.nl-NL.resx b/WebApplication/App_LocalResources/Register.aspx.nl-NL.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.nl-NL.resx +++ b/WebApplication/App_LocalResources/Register.aspx.nl-NL.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.pl-PL.resx b/WebApplication/App_LocalResources/Register.aspx.pl-PL.resx index cef0bbf..f817d1e 100644 --- a/WebApplication/App_LocalResources/Register.aspx.pl-PL.resx +++ b/WebApplication/App_LocalResources/Register.aspx.pl-PL.resx @@ -271,7 +271,7 @@ Kliknij tutaj aby utworzyć swoje konto - Tekst kontrolny: + Tekst kontrolny Adres e-mail diff --git a/WebApplication/App_LocalResources/Register.aspx.pt-BR.resx b/WebApplication/App_LocalResources/Register.aspx.pt-BR.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.pt-BR.resx +++ b/WebApplication/App_LocalResources/Register.aspx.pt-BR.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.resx b/WebApplication/App_LocalResources/Register.aspx.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.resx +++ b/WebApplication/App_LocalResources/Register.aspx.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.ro-RO.resx b/WebApplication/App_LocalResources/Register.aspx.ro-RO.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.ro-RO.resx +++ b/WebApplication/App_LocalResources/Register.aspx.ro-RO.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.ru-RU.resx b/WebApplication/App_LocalResources/Register.aspx.ru-RU.resx index 4b8a9d9..d9b20e6 100644 --- a/WebApplication/App_LocalResources/Register.aspx.ru-RU.resx +++ b/WebApplication/App_LocalResources/Register.aspx.ru-RU.resx @@ -172,7 +172,7 @@ - Защита от авторегистраций (регистрозависимо): + Защита от авторегистраций (регистрозависимо) НикНейм diff --git a/WebApplication/App_LocalResources/Register.aspx.sk-SK.resx b/WebApplication/App_LocalResources/Register.aspx.sk-SK.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.sk-SK.resx +++ b/WebApplication/App_LocalResources/Register.aspx.sk-SK.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.sr-Latn-CS.resx b/WebApplication/App_LocalResources/Register.aspx.sr-Latn-CS.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.sr-Latn-CS.resx +++ b/WebApplication/App_LocalResources/Register.aspx.sr-Latn-CS.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/App_LocalResources/Register.aspx.tr-TR.resx b/WebApplication/App_LocalResources/Register.aspx.tr-TR.resx index d62f71e..3e454c4 100644 --- a/WebApplication/App_LocalResources/Register.aspx.tr-TR.resx +++ b/WebApplication/App_LocalResources/Register.aspx.tr-TR.resx @@ -172,7 +172,7 @@ - Kontrol metni (Büyük/küçük harfe dikkat): + Kontrol metni (Büyük/küçük harfe dikkat) Görünür Ad diff --git a/WebApplication/App_LocalResources/Register.aspx.uk-UA.resx b/WebApplication/App_LocalResources/Register.aspx.uk-UA.resx index e7ab290..58bebea 100644 --- a/WebApplication/App_LocalResources/Register.aspx.uk-UA.resx +++ b/WebApplication/App_LocalResources/Register.aspx.uk-UA.resx @@ -172,7 +172,7 @@ - Захист від автореєстрацій (регістрозалежно): + Захист від автореєстрацій (регістрозалежно) НікНейм diff --git a/WebApplication/App_LocalResources/Register.aspx.zh-cn.resx b/WebApplication/App_LocalResources/Register.aspx.zh-cn.resx index c8d5c5b..b400878 100644 --- a/WebApplication/App_LocalResources/Register.aspx.zh-cn.resx +++ b/WebApplication/App_LocalResources/Register.aspx.zh-cn.resx @@ -172,7 +172,7 @@ - 验证码(大小写敏感): + 验证码(大小写敏感) 显示名称 diff --git a/WebApplication/App_LocalResources/Register.aspx.zh-tw.resx b/WebApplication/App_LocalResources/Register.aspx.zh-tw.resx index a58a39d..ab9ba04 100644 --- a/WebApplication/App_LocalResources/Register.aspx.zh-tw.resx +++ b/WebApplication/App_LocalResources/Register.aspx.zh-tw.resx @@ -172,7 +172,7 @@ - Control Text (case sensitive): + Control Text (case sensitive) Display Name diff --git a/WebApplication/Register.aspx b/WebApplication/Register.aspx index cf68d6a..af251e3 100644 --- a/WebApplication/Register.aspx +++ b/WebApplication/Register.aspx @@ -136,7 +136,7 @@ -

+

:

diff --git a/WebApplication/Register.aspx.designer.cs b/WebApplication/Register.aspx.designer.cs index 786a0da..834d302 100644 --- a/WebApplication/Register.aspx.designer.cs +++ b/WebApplication/Register.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3082 +// Runtime Version:2.0.50727.4927 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated.