diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c77ad9c7..4aedff92 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -9,6 +9,7 @@ * đŸ‡Ș🇾 Spanish by Jose Casas * đŸ‡ș🇩 Ukrainian by Alex Shpak * 🇾đŸ‡Ș Swedish by Erik Lindström +* 🇭đŸ‡ș Hungarian by Helpful User * đŸ‡·đŸ‡ș Russian by Denis Bondarenko * đŸ‡«đŸ‡· French by Arnaud Dieumegard * đŸ‡§đŸ‡· Brazilian Portuguese by [fabianski7](https://github.com/fabianski7) diff --git a/Post/build.gradle b/Post/build.gradle index 5ff29090..d4047d9a 100644 --- a/Post/build.gradle +++ b/Post/build.gradle @@ -1,11 +1,11 @@ plugins { - id 'com.android.library' - id 'kotlin-android' + id "com.android.library" + id "kotlin-android" } android { compileSdkVersion rootProject.ext.compileSDKVersion - buildToolsVersion "29.0.3" + buildToolsVersion '30.0.3' defaultConfig { minSdkVersion rootProject.ext.minSDKVersion @@ -17,7 +17,7 @@ android { buildTypes { release { minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" } } } diff --git a/app/build.gradle b/app/build.gradle index a35f7a2b..4a610e3e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,29 +1,36 @@ plugins { - id 'com.android.application' - id 'kotlin-android' - id 'kotlin-kapt' - id 'kotlin-parcelize' + id "com.android.application" + id "kotlin-android" + id "kotlin-kapt" + id "kotlin-parcelize" } android { compileSdkVersion rootProject.ext.compileSDKVersion - buildToolsVersion "29.0.3" + buildToolsVersion "30.0.3" defaultConfig { applicationId "com.omgodse.notally" minSdkVersion rootProject.ext.minSDKVersion targetSdkVersion rootProject.ext.targetSDKVersion - versionCode 28 - versionName "3.3" - resConfigs 'en', 'ca', 'cs', 'de', 'es', 'fr', 'in', 'it', 'nb', 'nl', 'pl', 'pt-rBR', 'ru', 'sv', 'tl', 'uk' + versionCode 29 + versionName "3.4" + resConfigs "en", "ca", "cs", "de", "es", "fr", "hu", "in", "it", "nb", "nl", "pl", "pt-rBR", "ru", "sv", "tl", "uk" vectorDrawables.generatedDensities = [] } + kapt { + arguments { + arg("room.schemaLocation", "$projectDir/schemas") + } + } + buildTypes { release { + crunchPngs false minifyEnabled true shrinkResources true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" } } @@ -32,22 +39,20 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } - kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8.toString() } + kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8 } buildFeatures { viewBinding true } - - aaptOptions { cruncherEnabled false } } dependencies { final def roomVersion = "2.2.6" - final def stableNavVersion = "2.3.2" + final def stableNavVersion = "2.3.3" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" - implementation 'androidx.preference:preference-ktx:1.1.1' + implementation "androidx.preference:preference-ktx:1.1.1" - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0' + implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.0" kapt "androidx.room:room-compiler:$roomVersion" implementation "androidx.room:room-ktx:$roomVersion" @@ -56,8 +61,45 @@ dependencies { implementation "androidx.navigation:navigation-ui-ktx:$stableNavVersion" implementation "androidx.navigation:navigation-fragment-ktx:$stableNavVersion" - implementation 'org.ocpsoft.prettytime:prettytime:4.0.6.Final' - implementation 'com.google.android.material:material:1.3.0-rc01' + implementation "org.ocpsoft.prettytime:prettytime:4.0.6.Final" + implementation "com.google.android.material:material:1.3.0" + + implementation project(":Post") +} + +/** + * This is a neat script I've made that outputs the translatable strings in + * the main`values.xml` file to a CSV file in the `build` dir of the module. + * (Useful for giving to translators) + * + * If you are looking to use this in your project as well, bear in mind that + * this is a custom solution. It does not handle edge cases such as quotation marks + * or commas in strings. + * + * To run, use the integrated terminal window in Android Studio or navigate to the + * root directory of your project and type `gradlew CSV` + */ +tasks.register("CSV") { + def csv = file("$buildDir/Notally Translations.csv") + def strings = file("$projectDir/src/main/res/values/strings.xml") - implementation project(':Post') + def writer = csv.newWriter("UTF-8") + writer.writeLine("English Phrases , Translated Phrases") + + new XmlParser().parse(strings).iterator().forEachRemaining { Node node -> + if (isTranslatable(node)) { + writer.writeLine(node.text() + " , ") + } + } + + writer.close() +} + +private static boolean isTranslatable(Node node) { + def translatable = true + def translatableAttribute = node.attribute("translatable") + if (translatableAttribute != null) { + translatable = Boolean.parseBoolean(translatableAttribute) + } + return translatable } \ No newline at end of file diff --git a/app/schemas/com.omgodse.notally.room.NotallyDatabase/1.json b/app/schemas/com.omgodse.notally.room.NotallyDatabase/1.json new file mode 100644 index 00000000..7f774870 --- /dev/null +++ b/app/schemas/com.omgodse.notally.room.NotallyDatabase/1.json @@ -0,0 +1,121 @@ +{ + "formatVersion": 1, + "database": { + "version": 1, + "identityHash": "561523a76ccf21fe0a7ff6c1fef657a9", + "entities": [ + { + "tableName": "BaseNote", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` TEXT NOT NULL, `folder` TEXT NOT NULL, `title` TEXT NOT NULL, `pinned` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, `labels` TEXT NOT NULL, `body` TEXT NOT NULL, `spans` TEXT NOT NULL, `items` TEXT NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "folder", + "columnName": "folder", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "pinned", + "columnName": "pinned", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "timestamp", + "columnName": "timestamp", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "labels", + "columnName": "labels", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "body", + "columnName": "body", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "spans", + "columnName": "spans", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "items", + "columnName": "items", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "index_BaseNote_id_folder_pinned_timestamp_labels", + "unique": false, + "columnNames": [ + "id", + "folder", + "pinned", + "timestamp", + "labels" + ], + "createSql": "CREATE INDEX IF NOT EXISTS `index_BaseNote_id_folder_pinned_timestamp_labels` ON `${TABLE_NAME}` (`id`, `folder`, `pinned`, `timestamp`, `labels`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "Label", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`value` TEXT NOT NULL, PRIMARY KEY(`value`))", + "fields": [ + { + "fieldPath": "value", + "columnName": "value", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "value" + ], + "autoGenerate": false + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '561523a76ccf21fe0a7ff6c1fef657a9')" + ] + } +} \ No newline at end of file diff --git a/app/src/main/java/com/omgodse/notally/fragments/NotallyFragment.kt b/app/src/main/java/com/omgodse/notally/fragments/NotallyFragment.kt index 1d9294cb..0dd3e414 100644 --- a/app/src/main/java/com/omgodse/notally/fragments/NotallyFragment.kt +++ b/app/src/main/java/com/omgodse/notally/fragments/NotallyFragment.kt @@ -21,6 +21,7 @@ import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.StaggeredGridLayoutManager import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.omgodse.notally.R +import com.omgodse.notally.activities.MainActivity import com.omgodse.notally.activities.MakeList import com.omgodse.notally.activities.TakeNote import com.omgodse.notally.databinding.FragmentNotesBinding diff --git a/app/src/main/res/layout/fragment_notes.xml b/app/src/main/res/layout/fragment_notes.xml index 57fd6fbe..40b9ded1 100644 --- a/app/src/main/res/layout/fragment_notes.xml +++ b/app/src/main/res/layout/fragment_notes.xml @@ -1,7 +1,6 @@ diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml new file mode 100644 index 00000000..b9989f9a --- /dev/null +++ b/app/src/main/res/values-hu/strings.xml @@ -0,0 +1,100 @@ + + + + Jegyzetek + CĂ­mkĂ©k + Kuka + ArchivĂĄlt + BeĂĄllĂ­tĂĄsok + + + MegosztĂĄs + KeresĂ©s + TörlĂ©s + VisszaĂĄllĂ­tĂĄs + ArchivĂĄlĂĄs + ArchivĂĄlĂĄs visszavonĂĄsa + VĂ©gleges törlĂ©s + + + RögzĂ­tĂ©s + FeloldĂĄs + KitƱzve + + + MegtekintĂ©s
 + MegosztĂĄs
 + + + MentĂ©s + SzerkesztĂ©s + MĂ©gse + Lista + FeljegyzĂ©s + CĂ­mke lĂ©trehozĂĄsa + ExportĂĄlĂĄs + Sima szöveg + MentĂ©s az eszközre + CĂ­mke szerkesztĂ©se + A cĂ­mke mĂĄr lĂ©tezik + Törölni szeretnĂ©d a cĂ­mkĂ©t? + Nincsenek cĂ­mkĂ©k. SzeretnĂ©l kĂ©szĂ­teni egyet? + VĂ©glegesen törölni szeretnĂ© a jegyzetet? + A jegyzetek ezzel a cĂ­mkĂ©vel nem kerĂŒlnek törlĂ©sre + + + Jegyzet + Elem + DĂĄtum + CĂ­m + Elem hozzĂĄadĂĄsa + mĂ©g 1 elem + %1$d több elem + MegfogĂł nyĂ©l + FĂ©lkövĂ©r + HivatkozĂĄs + DƑlt + ÁthĂșzĂĄs + FormĂĄzĂĄs törlĂ©se + ÁllandĂł szĂ©lessĂ©gƱ + + + Elmentve az eszközre + Elmentve a Notally -ban + Üres jegyzet + Üres lista + Elvetett ĂŒres jegyzet + Elvetett ĂŒres lista + A hivatkozĂĄs nem nyithatĂł meg + Valami elromlott. KĂ©rlek prĂłbĂĄld Ășjra + + + MegjelenĂ©s + + NĂ©zet + Lista + RĂĄcs + + TĂ©ma + VilĂĄgos + SötĂ©t + Rendszer követĂ©se + + KĂĄrtya tĂ­pusa + LebegƑ + Lapos + + Tartalom sƱrƱsĂ©ge + Elemek szĂĄma egy listĂĄban + Sorok szĂĄma egy jegyzetben + + LĂ©trehozĂĄsi dĂĄtum + + BiztonsĂĄgi mentĂ©s + Jegyzetek exportĂĄlĂĄsa fĂĄjlba + Jegyzetek importĂĄlĂĄsa fĂĄjlbĂłl + + NĂ©vjegy + KönyvtĂĄrak + ÉrtĂ©keld ezt az alkalmazĂĄst + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index a38b2429..4c9354bc 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -143,7 +143,6 @@ diff --git a/build.gradle b/build.gradle index 1c306146..aa0ea50f 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { minSDKVersion = 21 targetSDKVersion = 29 compileSDKVersion = 30 - kotlinVersion = '1.4.21' + kotlinVersion = "1.4.30" } repositories { @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.2' + classpath "com.android.tools.build:gradle:4.1.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f715b9aa..4cbc043b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jan 21 09:36:01 IST 2021 +#Sat Feb 06 22:56:10 IST 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists \ No newline at end of file