Add indexed list of messages.

This commit is contained in:
2019-05-24 01:12:54 +01:00
parent 868f202be5
commit 040e1fccf4
2 changed files with 41 additions and 4 deletions

View File

@@ -1,5 +1,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Claunia.Localization.Parsers;
using NUnit.Framework;
namespace Claunia.Localization.Test.gettext
@@ -10,9 +13,14 @@ namespace Claunia.Localization.Test.gettext
[Test]
public void Parse()
{
var testPath = Path.Combine(".", "gettext","es_ES.po");
string testPath = Path.Combine(".", "gettext", "es_ES.po");
var localization = Claunia.Localization.Parsers.GetText.Parse(testPath, Encoding.GetEncoding("iso8859-1"));
Core.Localization localization = GetText.Parse(testPath, Encoding.GetEncoding("iso8859-1"));
DateTime start = DateTime.UtcNow;
Dictionary<string, string> indexed = localization.GetIndex("es_ES");
DateTime end = DateTime.UtcNow;
TimeSpan elapsed = end - start;
}
}
}