diff --git a/app/src/main/java/com/github/libretube/Constants.kt b/app/src/main/java/com/github/libretube/Constants.kt index 9ac567c4f..7c5b6c075 100644 --- a/app/src/main/java/com/github/libretube/Constants.kt +++ b/app/src/main/java/com/github/libretube/Constants.kt @@ -12,6 +12,7 @@ const val WEBSITE_URL = "https://libre-tube.github.io/" const val DONATE_URL = "https://github.com/libre-tube/LibreTube#donate" const val GITHUB_URL = "https://github.com/libre-tube/LibreTube" const val PIPED_GITHUB_URL = "https://github.com/TeamPiped/Piped" +const val WEBLATE_URL = "https://hosted.weblate.org/projects/libretube/libretube/" /** * Social media links for the community fragment diff --git a/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt b/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt index a9d36db59..7ead7b080 100644 --- a/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt +++ b/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt @@ -13,6 +13,7 @@ import com.github.libretube.DONATE_URL import com.github.libretube.GITHUB_URL import com.github.libretube.PIPED_GITHUB_URL import com.github.libretube.R +import com.github.libretube.WEBLATE_URL import com.github.libretube.WEBSITE_URL import com.github.libretube.activities.SettingsActivity import com.github.libretube.databinding.FragmentAboutBinding @@ -55,6 +56,15 @@ class AboutFragment : Fragment() { true } + binding.translate.setOnClickListener { + openLinkFromHref(WEBLATE_URL) + } + binding.translate.setOnLongClickListener { + val text = context?.getString(R.string.translate_summary)!! + showSnackBar(text) + true + } + binding.donate.setOnClickListener { openLinkFromHref(DONATE_URL) } diff --git a/app/src/main/res/drawable/ic_weblate.xml b/app/src/main/res/drawable/ic_weblate.xml new file mode 100644 index 000000000..beaa5cb5a --- /dev/null +++ b/app/src/main/res/drawable/ic_weblate.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index e8203e725..41713ad11 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -81,6 +81,24 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 274820fc6..02b60c894 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -284,4 +284,6 @@ All networks Metered WiFi only + Translate + Help by translating the app to the language you speak \ No newline at end of file