This repository was archived by the owner on Jun 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 432
Expand file tree
/
Copy pathComposerLocalizable.swift
More file actions
46 lines (39 loc) · 1.45 KB
/
ComposerLocalizable.swift
File metadata and controls
46 lines (39 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// ComposerLocalizable.swift
// DifferenceKit
//
// Created by Matheus Cardoso on 11/20/18.
//
import Foundation
enum ComposerLocalizableKey: String {
case textViewPlaceholder = "composer.textview.placeholder"
case editingViewTitle = "composer.editingview.title"
case swipeIndicatorViewTitle = "composer.recordaudioview.swipe"
// Accessibility
case sendButtonLabel = "composer.sendButton.label"
case micButtonLabel = "composer.micButton.label"
case addButtonLabel = "composer.addButton.label"
case redMicButtonLabel = "composer.redMicButton.label"
case playButtonLabel = "composer.playButton.label"
case pauseButtonLabel = "composer.pauseButton.label"
case discardButtonLabel = "composer.discardButton.label"
case durationLabel = "composer.duration.label"
case swipeLabel = "composer.recordaudioview.swipe.label"
case sliderLabelPosition = "composer.slider.position.label"
case sliderLabelOf = "composer.slider.of.label"
case micButtonHint = "composer.recordaudioview.micButton.hint"
}
protocol ComposerLocalizable {
static func localized(_ key: ComposerLocalizableKey) -> String
}
extension ComposerLocalizable {
static func localized(_ key: ComposerLocalizableKey) -> String {
return NSLocalizedString(
key.rawValue,
tableName: "Localizable",
bundle: Bundle(for: ComposerView.self),
value: "",
comment: ""
)
}
}