mirror of https://github.com/Squidex/squidex.git
committed by
GitHub
10 changed files with 2284 additions and 666 deletions
File diff suppressed because it is too large
@ -0,0 +1,20 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
namespace GenerateLanguages |
|||
{ |
|||
public sealed class Language |
|||
{ |
|||
public string Code { get; set; } |
|||
|
|||
public string NameEnglish { get; set; } |
|||
|
|||
public string NameNative { get; set; } |
|||
|
|||
public string FieldName { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,65 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using System.Text; |
|||
|
|||
namespace GenerateLanguages |
|||
{ |
|||
internal sealed class SourceBuilder |
|||
{ |
|||
private readonly StringBuilder builder = new StringBuilder(); |
|||
private int intentation; |
|||
|
|||
public SourceBuilder StartBlock() |
|||
{ |
|||
intentation += 4; |
|||
|
|||
return this; |
|||
} |
|||
|
|||
public SourceBuilder WriteLine(string line) |
|||
{ |
|||
if (line.Equals("}", StringComparison.Ordinal)) |
|||
{ |
|||
EndBlock(); |
|||
} |
|||
|
|||
for (var i = 0; i < intentation; i++) |
|||
{ |
|||
builder.Append(' '); |
|||
} |
|||
|
|||
builder.AppendLine(line); |
|||
|
|||
if (line.Equals("{", StringComparison.Ordinal)) |
|||
{ |
|||
StartBlock(); |
|||
} |
|||
|
|||
return this; |
|||
} |
|||
|
|||
public SourceBuilder WriteLine() |
|||
{ |
|||
builder.AppendLine(); |
|||
|
|||
return this; |
|||
} |
|||
|
|||
public SourceBuilder EndBlock() |
|||
{ |
|||
intentation -= 4; |
|||
|
|||
return this; |
|||
} |
|||
|
|||
public override string ToString() |
|||
{ |
|||
return builder.ToString(); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
|
Loading…
Reference in new issue