Implemented the "localise(key: )" static function in the String+Helper extension for the Browse module.
This commit is contained in:
parent
8247870e1e
commit
120356bf8e
11
Modules/Sources/Browse/UI/Extensions/String+Constants.swift
Normal file
11
Modules/Sources/Browse/UI/Extensions/String+Constants.swift
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
//
|
||||||
|
// String+Constants.swift
|
||||||
|
// Browse
|
||||||
|
//
|
||||||
|
// Created by Javier Cicchelli on 16/12/2022.
|
||||||
|
// Copyright © 2022 Röck+Cöde. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
extension String {
|
||||||
|
static let empty = ""
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// String+Localisations.swift
|
||||||
|
// Browse
|
||||||
|
//
|
||||||
|
// Created by Javier Cicchelli on 16/12/2022.
|
||||||
|
// Copyright © 2022 Röck+Cöde. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension String {
|
||||||
|
static func localise(key: String) -> Self {
|
||||||
|
NSLocalizedString(
|
||||||
|
key,
|
||||||
|
bundle: .module,
|
||||||
|
comment: .empty
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user