Skip to content

Instantly share code, notes, and snippets.

View MartinMoizard's full-sized avatar

Martin Moizard MartinMoizard

View GitHub Profile
@MartinMoizard
MartinMoizard / cleanup.txt
Created November 19, 2020 09:28
Translation cleanup
> ./babbler --diff
[WARNING] 'mapLayers_lenses_mapLockdown': Locale defined remotely but not used locally
[WARNING] 'mapLayers_lenses_stayAtHome': Locale defined remotely but not used locally
[WARNING] 'mapLayers_mapLockdown_leaderboard_title': Locale defined remotely but not used locally
[WARNING] 'mapLayers_mapLockdown_splash_subtitle': Locale defined remotely but not used locally
[WARNING] 'mapLayers_mapLockdown_splash_title': Locale defined remotely but not used locally
[WARNING] 'mapLayers_mapLockdown_title': Locale defined remotely but not used locally
[WARNING] 'settings_about_section_about': Locale defined remotely but not used locally
@MartinMoizard
MartinMoizard / edition.txt
Last active November 19, 2020 09:27
Translation update
> ./babbler
> ...
> git status
modified: Zenly/.babbler
modified: Zenly/Resources/Localization/da.lproj/Localizable.strings
modified: Zenly/Resources/Localization/de.lproj/Localizable.strings
modified: Zenly/Resources/Localization/el.lproj/Localizable.strings
modified: Zenly/Resources/Localization/en.lproj/Localizable.strings
modified: Zenly/Resources/Localization/es-419.lproj/Localizable.strings
modified: Zenly/Resources/Localization/es.lproj/Localizable.strings
@MartinMoizard
MartinMoizard / untranslated.txt
Created November 19, 2020 09:25
Finding untranslated strings
> ./babbler --untranslated
[WARNING] '../../app/src/main/.babbler': Needs translations
[WARNING] '../../platform/framework/src/main/.babbler': Needs translations
[WARNING] '../../features/experimental/src/main/.babbler': Needs translations
[WARNING] '../../features/flight-lens/src/main/.babbler': Needs translations
[WARNING] '../../features/share-sheet/src/main/.babbler': Needs translations
[WARNING] '../../features/media-viewer/api/src/main/.babbler': Needs translations
[WARNING] '../../features/footprints/src/main/.babbler': Needs translations
[WARNING] '../../features/intent-chooser/src/main/.babbler': Needs translations
[WARNING] '../../features/media-picker/api/src/main/.babbler': Needs translations
@MartinMoizard
MartinMoizard / Untranslated.strings
Created November 19, 2020 09:22
iOS Untranslated file
// Weather
"weather_condition_sunny" = "Sunny";
"weather_condition_cloudy" = "Cloudy";
"weather_condition_rainy" = "Rainy";
// Quotes
"chat_quote_image" = "Image";
"chat_quote_video" = "Video";
/// Every view interacting with a `SayHelloViewModel` instance can conform to this.
protocol SayHelloViewModelBindable {
var disposeBag: DisposeBag? { get }
func bind(to viewModel: SayHelloViewModel)
}
/// TableViewCells
final class TextFieldCell: UITableViewCell, SayHelloViewModelBindable {
@IBOutlet weak var nameTextField: UITextField!
var disposeBag: DisposeBag?
final class SayHelloViewModel: ViewModelType {
let input: Input
let output: Output
struct Input {
let name: AnyObserver<String>
let validate: AnyObserver<Void>
}
struct Output {
@MartinMoizard
MartinMoizard / ViewModelType.swift
Created September 3, 2017 09:01
ViewModelType
protocol ViewModelType {
associatedtype Input
associatedtype Output
var input: Input { get }
var output: Output { get }
}
/// TableViewCells
final class TextFieldCell: UITableViewCell {
@IBOutlet weak var nameTextField: UITextField!
}
final class ButtonCell: UITableViewCell {
@IBOutlet weak var validateButton: UIButton!
}
final class GreetingCell: UITableViewCell {
final class SayHelloViewController: UIViewController {
@IBOutlet weak var nameTextField: UITextField!
@IBOutlet weak var validateButton: UIButton!
@IBOutlet weak var greetingLabel: UILabel!
private let viewModel = SayHelloViewModel()
private let bag = DisposeBag()
override func viewDidLoad() {
final class SayHelloViewModel: ViewModelType {
struct Input {
let name: Observable<String>
let validate: Observable<Void>
}
struct Output {
let greeting: Driver<String>
}