Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Localization] PT-BR #32

Merged
merged 10 commits into from
Oct 27, 2022
7 changes: 5 additions & 2 deletions VocabularyTrainer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
18943A0929094F470017E1A2 /* LanguageScreenViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageScreenViewController.swift; sourceTree = "<group>"; };
18943A0B2909726B0017E1A2 /* VocabularyCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VocabularyCell.swift; sourceTree = "<group>"; };
B3657DFC290740D8000D76C8 /* AddNewWordViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddNewWordViewController.swift; sourceTree = "<group>"; };
B3BBF4422909F64B004B2125 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = "pt-BR"; path = "pt-BR.lproj/pp.html"; sourceTree = "<group>"; };
B3BBF4432909F653004B2125 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };
CE0012FE2243F21C002F86DE /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
CE05F621229F17830097E3BB /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
CE05F623229F17AF0097E3BB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -283,6 +285,7 @@
Base,
de,
nl,
"pt-BR",
);
mainGroup = CE86C53F2235AE20008A5B73;
productRefGroup = CE86C5492235AE20008A5B73 /* Products */;
Expand Down Expand Up @@ -331,8 +334,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CE86C584223684D2008A5B73 /* AddNewWordViewController.swift in Sources */,
CE86C5802235C8AD008A5B73 /* LanguageScreenViewController.swift in Sources */,
B3657DFD290740D9000D76C8 /* AddNewWordViewController.swift in Sources */,
CE86C54E2235AE20008A5B73 /* HomeScreenViewController.swift in Sources */,
CE0012FF2243F21C002F86DE /* Extensions.swift in Sources */,
Expand Down Expand Up @@ -385,6 +386,7 @@
CE05F623229F17AF0097E3BB /* en */,
CE05F625229F17C40097E3BB /* de */,
CE92ABFA28E97CAF00FE2EBC /* nl */,
B3BBF4432909F653004B2125 /* pt-BR */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand All @@ -404,6 +406,7 @@
CECD6343235E54350060911F /* Base */,
CECD6346235E54420060911F /* de */,
CE92ABF928E97C5600FE2EBC /* nl */,
B3BBF4422909F64B004B2125 /* pt-BR */,
);
name = pp.html;
sourceTree = "<group>";
Expand Down
2 changes: 2 additions & 0 deletions VocabularyTrainer/Home Screen/HomeScreenViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ class HomeScreenViewController: UIViewController, UITableViewDelegate, UITableVi
ppUrl = URL(string: "https://mic.st/flippyLearn/pp_de.html")
case "nl":
ppUrl = URL(string: "https://mic.st/flippyLearn/pp_nl.html")
case "pt_BR":
ppUrl = URL(string: "https://mic.st/flippyLearn/pp_pt_br.html")
default:
ppUrl = URL(string: "https://mic.st/flippyLearn/pp_en.html")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,11 @@ class LanguageScreenViewController: UIViewController, UISearchBarDelegate, MFMai
present(alert, animated: true, completion: nil)
}

@IBAction func newWordButtonTapped(_ sender: Any) {
let viewController = AddNewWordViewController(selectedLanguage: selectedLanguage)
self.present(viewController, animated: true)
}

@objc func sortButtonTapped(_ sender: UIButton) {

let chevronUpImage = UIImage(systemName: "chevron.up.square.fill", withConfiguration: symbolConfig)
Expand Down
8 changes: 4 additions & 4 deletions VocabularyTrainer/TrainingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class TrainingViewController: UIViewController {
currentTrainingHeader.numberOfLines = 0;
currentTrainingHeader.lineBreakMode = .byWordWrapping
currentTrainingHeader.text = """
Training:
\(selectedLanguage ?? "no language selected")
\(NSLocalizedString("Training:", comment: "Training:"))
\(selectedLanguage ?? NSLocalizedString("No language selected", comment: "No language selected"))
"""

styleButtons()
Expand Down Expand Up @@ -160,7 +160,7 @@ class TrainingViewController: UIViewController {
self.checkInputButton.isHidden = true
self.takeALookButton.isHidden = true
})
showToast(message: "That's right! 🤠", yCoord: 400.0)
showToast(message: NSLocalizedString("That's right! 🤠", comment: "That's right! 🤠"), yCoord: 400.0)
answerInput.text = solution
nextButton.setTitle("Next word", for: .normal)
} else {
Expand All @@ -172,7 +172,7 @@ class TrainingViewController: UIViewController {
UIView.animate(withDuration: 0.2, animations: {
self.answerInput.backgroundColor = BackgroundColor.red
})
showToast(message: "That's wrong 😕", yCoord: 400.0)
showToast(message: NSLocalizedString("That's wrong 😕", comment: "That's wrong 😕"), yCoord: 400.0)
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions VocabularyTrainer/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"new Word" = "new word";
"translation" = "translation";
"Training" = "📖 Training";
"Training:" = "Training:";
"Delete Language" = "🗑 Delete Language";
"export" = "💾 export language";
"New word" = "New word";
Expand Down Expand Up @@ -63,3 +64,6 @@
"Please wait..." = "Please wait...";
"Edit word" = "✏️ Edit word";
"Your progress and probability configuration for this word will be saved" = "Your progress and probability configuration for this word will be saved";
"That's wrong 😕" = "That's wrong 😕";
"That's right! 🤠" = "That's right! 🤠";
"Import" = "Import";
68 changes: 68 additions & 0 deletions VocabularyTrainer/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
File.strings
VocabularyTrainer

Created by skrr on 29.05.19.
Copyright © 2019 mic. All rights reserved.
*/

"Your Languages" = "Seus idiomas";
"Currently there are no languages" = "Atualmente não há idiomas.\n\nVocê pode adicionar um novo idioma no botão abaixo.";
"Currently there are no words" = "Atualmente não há palavras.\n\nVocê pode adicionar uma nova palavra no botão abaixo.";
/*
\n\nIf you have any language files uploaded to your iPhone via iTunes, hit the \"import all\" button.";*/
"Add language" = "➕ Adicionar idioma";
"Add new language" = "Adicionar novo idioma";
"which language?" = "Idioma";
"Add" = "➕ Adicionar";
"< Back" = "↤ Voltar";
"%d words" = "%d palavras";
"%d word" = "%d palavra";
"0 words" = "0 palavras";
"My words" = "⚙️ Editar";
"new Word" = "nova palavra";
"translation" = "tradução";
"Training" = "📖 Treinar";
"Training:" = "Treinando:";
"Delete Language" = "🗑 Excluir idioma";
"export" = "💾 exportar idioma";
"New word" = "Nova palavra";
"Add new word" = "Adicionar nova palavra";
"No words inside 🕵️‍♀️" = "Sem palavras adicionadas 🕵️‍♀️";
"Delete %@" = "Deletar %@";
"Deleting this language will delete all your saved words and your learning progress.\nDo you want to proceed?" = "Deletando esse idioma, você irá deletar todas as palavras salvas e o seu progresso de aprendizado.\nVocê gostaria de continuar?";
"Cancel" = "Cancelar";
"Delete" = "🗑 Deletar";
"New word added" = "Nova palavra adicionada";
"Change word`s probability" = "Alterar probabilidade da palavra aparecer";
"Change word`s probability value. Higher value -> higher probability for word to appear.\nNew words start with 100." = "Alterar a probabilidade da palavra aparecer. Valores maiores significa que há maior probabilidade da palavra aparecer.\nNovas palavras começam com o valor 100.";
"Edit:" = "🛠 Editar:";
"Export successful:" = "Exportado com sucesso:";
"Exported the following languages:" = "Exportado os seguintes idiomas:";
"You may copy your file to your machine via iTunes:\n iPhone->Filesharing->Flippy->drag %@.csv into Finder" = "Você pode copiar o arquivo de idiomas para o seu computador pelo iTunes.\nAcesse: iPhone->Compartilhamento de Arquivos->Flippy->arraste %@.csv para uma pasta da sua preferência";
"You may copy your file to your machine via iTunes:\n iPhone->Filesharing->Flippy->drag csv-files into Finder" = "Você pode copiar o arquivo para o seu computador pelo iTunes.\nAcesse: iPhone->Compartilhamento de Arquivos->Flippy->arraste csv-files para o Finder";
"⤵ import" = "⤋ importar";
"↑ export" = "⇪ exportar";
"answer" = "resposta";
"Check" = "Confirmar";
"Take a look" = "Espiar";
"Skip word" = "Pular palavra";
"search for words" = "buscar palavras";
"Importing language files into the app will overwrite any languages in your app with the same name as the csv-file.\n Do you want to proceed?" = "Os idiomas existentes no seu aparelho caso possuam o mesmo nome que os arquivos csv-file a serem importados serão sobrescritos.\n Você gostaria de continuar?";
"There were not found any language files for your app.\nFor a template of a language file you may create a new language with some vocabulary inside this app and export it." = "Não foi encontrado qualquer arquivo de idioma para o seu app.\nPara ter o modelo do arquivo de idioma, você terá que criar um novo idioma com algumas palavras adicionadas dentro do app e exportar.";
"No language files found" = "Nenhum arquivo de idioma foi encontrado";
"👍 I was right" = "👍";
"👎 I was wrong" = "👎";
"Swipe left to edit word (edit its probability or delete it)" = "ℹ️ Arraste a palavra para a esquerda para editar.\nPalavras que estejam com uma barra vermelha maior, terá uma probabilidade maior de aparecer durante a prática.";
"ℹ️ Add new words with the button below" = "ℹ️ Adicione novas palavras pelo botão abaixo.";
"Importing language files" = "Importando arquivos de idiomas";
"Close" = "Fechar";
"About Flippy App" = "Sobre o Flippy";
"No language selected" = "Nenhum idioma selecionado";
"Please select a language to export first." = "Por favor, selecione um idioma primeiro para exportar.";
"Please wait..." = "Por favor, aguarde...";
"Edit word" = "✏️ Editar palavra";
"Your progress and probability configuration for this word will be saved" = "Seu progresso e configuração de probabilidade para essa palavra não será alterado com essa mudança";
"That's wrong 😕" = "Errado 😕";
"That's right! 🤠" = "Acertou! 🤠";
"Import" = "Importar";
84 changes: 84 additions & 0 deletions VocabularyTrainer/pt-BR.lproj/Main.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@

/* Class = "UIButton"; normalTitle = "Take a look"; ObjectID = "1g5-hc-GXA"; */
"1g5-hc-GXA.normalTitle" = "Espiar";

/* Class = "UISearchBar"; placeholder = "search for words"; ObjectID = "4AL-Ff-pOI"; */
"4AL-Ff-pOI.placeholder" = "buscar palavras";

/* Class = "UILabel"; text = "Language"; ObjectID = "4x2-GA-oeg"; */
"4x2-GA-oeg.text" = "Idioma";

/* Class = "UITextField"; placeholder = "answer"; ObjectID = "53n-g1-uwW"; */
"53n-g1-uwW.placeholder" = "resposta";

/* Class = "UILabel"; text = "Training:\nTurkish"; ObjectID = "5Cu-DE-YK3"; */
"5Cu-DE-YK3.text" = "Praticando:\nTurco";

/* Class = "UILabel"; text = "köpek"; ObjectID = "5Gx-1I-CQE"; */
"5Gx-1I-CQE.text" = "köpek";

/* Class = "UIButton"; normalTitle = "👍"; ObjectID = "87J-6T-hDZ"; */
"87J-6T-hDZ.normalTitle" = "👍";

/* Class = "UIButton"; normalTitle = "⤴ export"; ObjectID = "8Cb-Nv-Z0p"; */
"8Cb-Nv-Z0p.normalTitle" = "⤴ exportar";

/* Class = "UIButton"; normalTitle = "Training"; ObjectID = "8uJ-dW-rui"; */
"8uJ-dW-rui.normalTitle" = "Praticar";

/* Class = "UIButton"; normalTitle = "New word"; ObjectID = "BUp-gp-Omw"; */
"BUp-gp-Omw.normalTitle" = "Nova palavra";

/* Class = "UILabel"; text = "Hund"; ObjectID = "Il2-HT-ikf"; */
"Il2-HT-ikf.text" = "Hund";

/* Class = "UILabel"; text = "Label"; ObjectID = "J69-hW-zYM"; */
"J69-hW-zYM.text" = "Label";

/* Class = "UIButton"; normalTitle = "< Back"; ObjectID = "Jhf-6U-f7J"; */
"Jhf-6U-f7J.normalTitle" = "< Voltar";

/* Class = "UILabel"; text = "Dutch"; ObjectID = "Kdj-qz-jtM"; */
"Kdj-qz-jtM.text" = "Holandês";

/* Class = "UIButton"; normalTitle = "Add language"; ObjectID = "Nrq-QQ-ihD"; */
"Nrq-QQ-ihD.normalTitle" = "Adicionar Idioma";

/* Class = "UIButton"; normalTitle = "Check"; ObjectID = "SJQ-jN-5Xm"; */
"SJQ-jN-5Xm.normalTitle" = "Confirmar";

/* Class = "UIButton"; normalTitle = "About FlippyApp"; ObjectID = "WIf-kg-T6U"; */
"WIf-kg-T6U.normalTitle" = "Sobre FlippyApp";

/* Class = "UIButton"; normalTitle = "⤵ import"; ObjectID = "Wfy-tB-0pH"; */
"Wfy-tB-0pH.normalTitle" = "⤵ importar";

/* Class = "UILabel"; text = "dateAddedLabel"; ObjectID = "fnA-3F-RPz"; */
"fnA-3F-RPz.text" = "dateAddedLabel";

/* Class = "UIButton"; normalTitle = "My words"; ObjectID = "iBg-bb-bgl"; */
"iBg-bb-bgl.normalTitle" = "Minhas palavras";

/* Class = "UIButton"; normalTitle = "👎"; ObjectID = "lQT-3b-eN5"; */
"lQT-3b-eN5.normalTitle" = "👎";

/* Class = "UILabel"; text = "köpek"; ObjectID = "o3T-rB-i7W"; */
"o3T-rB-i7W.text" = "köpek";

/* Class = "UIButton"; normalTitle = "< Back"; ObjectID = "rDw-Te-IUC"; */
"rDw-Te-IUC.normalTitle" = "< Voltar";

/* Class = "UILabel"; text = "Your languages"; ObjectID = "rNH-Y6-8Zv"; */
"rNH-Y6-8Zv.text" = "Seus idiomas";

/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "sIk-MR-VHX"; */
"sIk-MR-VHX.normalTitle" = "Botão";

/* Class = "UILabel"; text = "124 words"; ObjectID = "tDl-JN-tww"; */
"tDl-JN-tww.text" = "124 palavras";

/* Class = "UIButton"; normalTitle = "Skip word"; ObjectID = "vAt-0V-rIb"; */
"vAt-0V-rIb.normalTitle" = "Pular palavra";

/* Class = "UIButton"; normalTitle = "Delete Language"; ObjectID = "zUX-sC-O0i"; */
"zUX-sC-O0i.normalTitle" = "Excluir idioma";
Loading