mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Remove MatrixKit stencil.
This commit is contained in:
parent
7ccbdc4efc
commit
ba53b01f95
1 changed files with 0 additions and 75 deletions
|
@ -1,75 +0,0 @@
|
||||||
// swiftlint:disable all
|
|
||||||
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen
|
|
||||||
|
|
||||||
{% if tables.count > 0 %}
|
|
||||||
{% set accessModifier %}{% if param.publicAccess %}public{% else %}internal{% endif %}{% endset %}
|
|
||||||
import Foundation
|
|
||||||
|
|
||||||
// swiftlint:disable superfluous_disable_command
|
|
||||||
// swiftlint:disable file_length
|
|
||||||
|
|
||||||
// MARK: - Strings
|
|
||||||
|
|
||||||
{% macro parametersBlock types %}{% filter removeNewlines:"leading" %}
|
|
||||||
{% for type in types %}
|
|
||||||
_ p{{forloop.counter}}: {{type}}{{ ", " if not forloop.last }}
|
|
||||||
{% endfor %}
|
|
||||||
{% endfilter %}{% endmacro %}
|
|
||||||
{% macro argumentsBlock types %}{% filter removeNewlines:"leading" %}
|
|
||||||
{% for type in types %}
|
|
||||||
{% if type == "UnsafeRawPointer" %}
|
|
||||||
Int(bitPattern: p{{forloop.counter}})
|
|
||||||
{% else %}
|
|
||||||
p{{forloop.counter}}
|
|
||||||
{% endif %}
|
|
||||||
{{ ", " if not forloop.last }}
|
|
||||||
{% endfor %}
|
|
||||||
{% endfilter %}{% endmacro %}
|
|
||||||
{% macro recursiveBlock table item %}
|
|
||||||
{% for string in item.strings %}
|
|
||||||
{% if not param.noComments %}
|
|
||||||
/// {{string.translation}}
|
|
||||||
{% endif %}
|
|
||||||
{% if string.types %}
|
|
||||||
{{accessModifier}} static func {{string.key|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords}}({% call parametersBlock string.types %}) -> String {
|
|
||||||
return {{className}}.tr("{{string.key}}", {% call argumentsBlock string.types %})
|
|
||||||
}
|
|
||||||
{% else %}
|
|
||||||
{{accessModifier}} static var {{string.key|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords}}: String {
|
|
||||||
return {{className}}.tr("{{string.key}}")
|
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% for child in item.children %}
|
|
||||||
{% call recursiveBlock table child %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endmacro %}
|
|
||||||
// swiftlint:disable function_parameter_count identifier_name line_length type_body_length
|
|
||||||
{% set className %}{{param.className|default:"L10n"}}{% endset %}
|
|
||||||
@objcMembers
|
|
||||||
{{accessModifier}} class {{className}}: NSObject {
|
|
||||||
{% if tables.count > 1 %}
|
|
||||||
{% for table in tables %}
|
|
||||||
{{accessModifier}} class {{table.name|swiftIdentifier:"pretty"|escapeReservedKeywords}} {
|
|
||||||
{% filter indent:2 %}{% call recursiveBlock table.name table.levels %}{% endfilter %}
|
|
||||||
}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
{% call recursiveBlock tables.first.name tables.first.levels %}
|
|
||||||
{% endif %}
|
|
||||||
}
|
|
||||||
// swiftlint:enable function_parameter_count identifier_name line_length type_body_length
|
|
||||||
|
|
||||||
// MARK: - Implementation Details
|
|
||||||
|
|
||||||
extension {{className}} {
|
|
||||||
static func tr(_ key: String, _ args: CVarArg...) -> String {
|
|
||||||
let format = Bundle.mxk_localizedString(forKey: key)!
|
|
||||||
return String(format: format, arguments: args)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private final class BundleToken {}
|
|
||||||
{% else %}
|
|
||||||
// No string found
|
|
||||||
{% endif %}
|
|
Loading…
Reference in a new issue