2021-05-17 07:46:43 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-06-01 08:29:46 +00:00
|
|
|
|
using System.IO;
|
2021-05-17 07:46:43 +00:00
|
|
|
|
|
|
|
|
|
namespace Frontend.Translations.Tests
|
|
|
|
|
{
|
|
|
|
|
public class TranslationFile
|
|
|
|
|
{
|
2021-12-21 13:12:37 +00:00
|
|
|
|
public TranslationFile(string path, List<TranslationItem> translations, string md5hash = null)
|
2021-05-17 07:46:43 +00:00
|
|
|
|
{
|
2021-06-01 08:29:46 +00:00
|
|
|
|
FilePath = path.Replace("/", "\\");
|
2021-05-20 15:11:43 +00:00
|
|
|
|
|
2021-06-01 08:29:46 +00:00
|
|
|
|
FileName = Path.GetFileName(FilePath);
|
|
|
|
|
|
|
|
|
|
Language = Directory.GetParent(FilePath).Name; //FilePath.Substring(FilePath.IndexOf("locales\\") + 8, 2);
|
|
|
|
|
|
|
|
|
|
Translations = translations;
|
2021-12-21 13:12:37 +00:00
|
|
|
|
|
|
|
|
|
Md5Hash = md5hash;
|
2021-05-17 07:46:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-06-01 08:29:46 +00:00
|
|
|
|
public string FilePath { get; }
|
|
|
|
|
|
|
|
|
|
public string FileName { get; }
|
2021-05-17 07:46:43 +00:00
|
|
|
|
|
2021-06-01 08:29:46 +00:00
|
|
|
|
public string Language { get; }
|
2021-05-20 15:11:43 +00:00
|
|
|
|
|
2021-06-01 08:29:46 +00:00
|
|
|
|
public List<TranslationItem> Translations { get; }
|
2021-12-21 13:12:37 +00:00
|
|
|
|
|
|
|
|
|
public string Md5Hash { get; }
|
2021-05-17 07:46:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|