Skip to content

Instantly share code, notes, and snippets.

// English file
"expires" = "Expires %@";
import UIKit
import SDWebImage
class FeedTableViewCell: UITableViewCell
{
@IBOutlet weak var productNameLabel: UILabel!
@IBOutlet weak var storeNameLabel: UILabel!
import Firebase
class Product
{
fileprivate static let COLLECTION_PATH = "product-feed"
typealias OnProductsFetched = (_ products: [Product]) -> Void
typealias Listener = ListenerRegistration
// ...
var productListener: Product.Listener?
fileprivate var products: [Product] = []
{
didSet
{
feedTableView.reloadData()
}
import Firebase
class Product
{
fileprivate static let COLLECTION_PATH = "product-feed-i18n/locales/{locale}"
// ...
fileprivate static var collection: CollectionReference
{
import Foundation
func centsToString(_ cents: Int) -> String
{
let dollars = Double(cents) / 100.0
let formatter = NumberFormatter()
formatter.numberStyle = .currency
brew tap phrase/brewed
brew install phraseapp
phraseapp:
access_token: <your_access_token>
project_id: <your_project_id>
push:
sources:
- file: ./Views/en.lproj/Main.strings
params:
file_format: strings
pull:
targets:
phraseapp:
access_token: <your_access_token>
project_id: <your_project_id>
push:
sources:
- file: ./Views/en.lproj/Main.strings
params:
locale_id: fd935424a9ef2dfd054d982ccb7a8064
file_format: strings
pull:
/* Class = "UILabel"; text = "ARTIST"; ObjectID = "2aL-Sw-YDC"; */
"2aL-Sw-YDC.text" = "الفنان ";
/* Class = "UIBarButtonItem"; title = "Back"; ObjectID = "cL2-YV-w5P"; */
"cL2-YV-w5P.title" = "رجوع";
// ...