mirror of https://github.com/Squidex/squidex.git
Browse Source
* Fix for the path of the translations * Created an option to get all the translations keys * Review points solved * Removed the saveKey from the save function Co-authored-by: Martijn Dijkgraaf <martijndijkgraaf@MacBook-Pro-van-Martijn.local>pull/559/head
committed by
GitHub
4 changed files with 79 additions and 1 deletions
@ -0,0 +1,39 @@ |
|||||
|
// ==========================================================================
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
||||
|
// All rights reserved. Licensed under the MIT license.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
using System; |
||||
|
using System.IO; |
||||
|
using System.Resources.NetStandard; |
||||
|
using Squidex.Translator.State; |
||||
|
|
||||
|
namespace Squidex.Translator.Processes |
||||
|
{ |
||||
|
public sealed class GenerateKeys |
||||
|
{ |
||||
|
private readonly TranslationService service; |
||||
|
private readonly DirectoryInfo folder; |
||||
|
|
||||
|
public GenerateKeys(DirectoryInfo folder, TranslationService service, string type) |
||||
|
{ |
||||
|
if (type == "frontend") |
||||
|
{ |
||||
|
this.folder = Frontend.GetFolder(folder); |
||||
|
} |
||||
|
else if (type == "backend") |
||||
|
{ |
||||
|
this.folder = new DirectoryInfo(Path.Combine(folder.FullName, "backend", "src", "Squidex.Shared")); |
||||
|
} |
||||
|
|
||||
|
this.service = service; |
||||
|
} |
||||
|
|
||||
|
public void Run() |
||||
|
{ |
||||
|
service.SaveKeys(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
// ==========================================================================
|
||||
|
// Squidex Headless CMS
|
||||
|
// ==========================================================================
|
||||
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
||||
|
// All rights reserved. Licensed under the MIT license.
|
||||
|
// ==========================================================================
|
||||
|
|
||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Squidex.Translator.State |
||||
|
{ |
||||
|
public sealed class TranslationKeys : SortedDictionary<string, string> |
||||
|
{ |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue