🇫🇷 translates
This commit is contained in:
parent
2674c3a705
commit
ba5a2b8552
3 changed files with 28 additions and 12 deletions
|
@ -140,9 +140,9 @@ class MainActivity : AppCompatActivity() {
|
|||
button = itemView?.findViewById(R.id.text_list_item)
|
||||
button?.setOnLongClickListener {
|
||||
val builder: android.app.AlertDialog.Builder = android.app.AlertDialog.Builder(instance)
|
||||
builder.setTitle("Remove ${button?.text}?")
|
||||
builder.setPositiveButton("Remove") { _, _ -> instance?.mainPage(button?.text.toString()) }
|
||||
builder.setNeutralButton("Cancel") { dialog, _ -> dialog.cancel() }
|
||||
builder.setTitle("${R.string.remove} ${button?.text} ?")
|
||||
builder.setPositiveButton(R.string.remove) { _, _ -> instance?.mainPage(button?.text.toString()) }
|
||||
builder.setNeutralButton(R.string.cancel) { dialog, _ -> dialog.cancel() }
|
||||
builder.show()
|
||||
true
|
||||
}
|
||||
|
@ -181,19 +181,19 @@ class MainActivity : AppCompatActivity() {
|
|||
val addButton = findViewById<FloatingActionButton>(R.id.addButton)
|
||||
addButton.setOnClickListener {
|
||||
val builder: android.app.AlertDialog.Builder = android.app.AlertDialog.Builder(this)
|
||||
builder.setTitle("App Name")
|
||||
builder.setTitle(R.string.newAppDialogTitle)
|
||||
val input = EditText(this)
|
||||
input.inputType = InputType.TYPE_CLASS_TEXT
|
||||
builder.setView(input)
|
||||
builder.setPositiveButton("Validate") { _, _ -> addApp(input.text.toString()) }
|
||||
builder.setNeutralButton("Cancel") { dialog, _ -> dialog.cancel() }
|
||||
builder.setPositiveButton(R.string.validate) { _, _ -> addApp(input.text.toString()) }
|
||||
builder.setNeutralButton(R.string.cancel) { dialog, _ -> dialog.cancel() }
|
||||
|
||||
builder.show()
|
||||
}
|
||||
|
||||
// easter egg
|
||||
addButton.setOnLongClickListener {
|
||||
Toast.makeText(this@MainActivity, "lâche frère", Toast.LENGTH_SHORT)
|
||||
Toast.makeText(this@MainActivity, R.string.dropBro, Toast.LENGTH_SHORT)
|
||||
.show()
|
||||
true
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ class MainActivity : AppCompatActivity() {
|
|||
val credentialsButton = findViewById<Button>(R.id.changeCredentialsButton)
|
||||
credentialsButton.setOnClickListener { // show main page when clicking the login button
|
||||
Credentials().delete()
|
||||
Toast.makeText(this@MainActivity, "Deleted credentials", Toast.LENGTH_LONG)
|
||||
Toast.makeText(this@MainActivity, R.string.deletedCredentials, Toast.LENGTH_LONG)
|
||||
.show()
|
||||
loginPage()
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ class MainActivity : AppCompatActivity() {
|
|||
if (ContextCompat.checkSelfPermission(this@MainActivity, Manifest.permission.INTERNET)
|
||||
!= PackageManager.PERMISSION_GRANTED
|
||||
) {
|
||||
Toast.makeText(this@MainActivity, "No permission to use the internet", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(this@MainActivity, R.string.internetPermission, Toast.LENGTH_SHORT).show()
|
||||
this.finishAffinity()
|
||||
} else {
|
||||
Scraper(user, password, app = app, debug = true).search()
|
||||
|
@ -243,9 +243,7 @@ class MainActivity : AppCompatActivity() {
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (prefs!!.getBoolean("firstrun", true)) {
|
||||
println("Generate RSA keys...")
|
||||
Credentials().generateKey()
|
||||
println("Done!")
|
||||
Credentials().generateKey() // Generate RSA keys
|
||||
prefs!!.edit().putBoolean("firstrun", false)
|
||||
.apply() // first run done, now the next ones won't be "first".
|
||||
}
|
||||
|
|
|
@ -9,4 +9,11 @@
|
|||
<string name="changeCredentials">Change les identifiants</string>
|
||||
<string name="sourceCode">Code source</string>
|
||||
<string name="credits">Crédits</string>
|
||||
<string name="remove">Retirer</string>
|
||||
<string name="cancel">Annuler</string>
|
||||
<string name="newAppDialogTitle">Nom de l\'application</string>
|
||||
<string name="validate">Valider</string>
|
||||
<string name="deletedCredentials">Identifiants supprimés</string>
|
||||
<string name="dropBro">lâche frère</string>
|
||||
<string name="internetPermission">Pas la permission d\'utiliser internet</string>
|
||||
</resources>
|
|
@ -6,10 +6,21 @@
|
|||
<string name="userLogin">Username</string>
|
||||
<string name="passwordLogin">Password</string>
|
||||
<string name="buttonLogin">Login</string>
|
||||
|
||||
<!-- Main page -->
|
||||
<string name="newAppDialogTitle">App Name</string>
|
||||
<string name="validate">Validate</string>
|
||||
<string name="remove">Remove</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="dropBro">drop bro</string>
|
||||
|
||||
<!-- Settings page -->
|
||||
<string name="titleSettings">Settings</string>
|
||||
<string name="changeCredentials">Change credentials</string>
|
||||
<string name="deletedCredentials">Deleted credentials</string>
|
||||
<string name="sourceCode">Source code</string>
|
||||
<string name="credits">Credits</string>
|
||||
|
||||
<!-- Scraper -->
|
||||
<string name="internetPermission">No permission to use internet</string>
|
||||
</resources>
|
Reference in a new issue