Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragrajaghh <agrajaghh@gmail.com>2016-09-30 11:04:11 +0300
committeragrajaghh <agrajaghh@gmail.com>2016-09-30 11:04:11 +0300
commit2e88e82cae4b2e7e58fa5944565e0d82b6b9f8c7 (patch)
treebffcda630e45175266f7ad79b2b0e0faf35cf49e /BuildTools
parent93bbdf6db2fca47c412ab3dee4382db355adc4c7 (diff)
count the lines from the beginning not from the end
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/LocalizationTool2/Program.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/BuildTools/LocalizationTool2/Program.cs b/BuildTools/LocalizationTool2/Program.cs
index 7030b7317..9fd7d69bd 100644
--- a/BuildTools/LocalizationTool2/Program.cs
+++ b/BuildTools/LocalizationTool2/Program.cs
@@ -49,7 +49,7 @@ namespace LocalizationTool2
var txt = File.ReadAllText(f);
foreach (Match match in re.Matches(txt))
{
- var linepos = txt.Substring(match.Index).Count(x => x == '\n');
+ var linepos = txt.Substring(0, match.Index).Count(x => x == '\n') + 1;
var str = match.Groups["sourcestring"].Value.Replace("\n", "\\n").Replace("\r", "\\r");
LocalizationEntry le;
if (!map.TryGetValue(str, out le))