diff options
author | Allan Wang <me@allanwang.ca> | 2017-11-08 22:40:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-08 22:40:06 -0500 |
commit | f343d0f04c9cbb210f2b56b4f0c534ac56aa76ef (patch) | |
tree | 2a261a6ed4af0c17233714af7673d5370f19edbf | |
parent | 3b1cbd2f2cf211b804784bef33de85b8a889677e (diff) | |
download | kau-f343d0f04c9cbb210f2b56b4f0c534ac56aa76ef.tar.gz kau-f343d0f04c9cbb210f2b56b4f0c534ac56aa76ef.tar.bz2 kau-f343d0f04c9cbb210f2b56b4f0c534ac56aa76ef.zip |
Translations Vietnamese (#99)
* Add translations
* Lint
* Inline
* Optimize imports
* Replace ellipsis
18 files changed, 103 insertions, 35 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt b/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt index 32573bc..036f16c 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt @@ -3,7 +3,6 @@ package ca.allanwang.kau.about import android.content.Context import android.content.res.Configuration import android.util.AttributeSet -import android.widget.LinearLayout import android.widget.TextView import ca.allanwang.kau.ui.views.CollapsibleView import ca.allanwang.kau.ui.views.CollapsibleViewDelegate diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt index 3f764d3..10a18b2 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt @@ -7,7 +7,6 @@ import ca.allanwang.kau.adapters.ThemableIItemDelegate import ca.allanwang.kau.iitems.KauIItem import ca.allanwang.kau.ui.views.CutoutView import ca.allanwang.kau.utils.bindView -import com.mikepenz.fastadapter.items.AbstractItem /** * Created by Allan Wang on 2017-06-28. diff --git a/about/src/main/res/values-vi/strings_about.xml b/about/src/main/res/values-vi/strings_about.xml new file mode 100644 index 0000000..57696a1 --- /dev/null +++ b/about/src/main/res/values-vi/strings_about.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<resources> + <string name="kau_about_libraries_intro">Ứng dụng này ra đời nhờ những thư viện tuyệt vời dưới đây.</string> + <string name="kau_about_faq_intro">CÂU HỎI THƯỜNG GẶP</string> +</resources> diff --git a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt index ed98090..713b800 100644 --- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt +++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt @@ -24,7 +24,10 @@ import android.util.AttributeSet import android.view.Gravity import android.widget.FrameLayout import android.widget.Toast -import ca.allanwang.kau.utils.* +import ca.allanwang.kau.utils.getDip +import ca.allanwang.kau.utils.setBackgroundColorRes +import ca.allanwang.kau.utils.toColor +import ca.allanwang.kau.utils.toHSV /** * Created by Allan Wang on 2017-06-10. diff --git a/colorpicker/src/main/res/values-vi/strings_colorpicker.xml b/colorpicker/src/main/res/values-vi/strings_colorpicker.xml new file mode 100644 index 0000000..5149c21 --- /dev/null +++ b/colorpicker/src/main/res/values-vi/strings_colorpicker.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<!--Generated by crowdin.com--> +<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName"> + <string name="kau_md_color_palette">Bảng màu</string> + <string name="kau_md_presets">Cài đặt sẵn</string> +</resources> diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt index 4c5563b..d2c1190 100644 --- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt +++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt @@ -6,7 +6,6 @@ import android.support.annotation.RequiresApi import android.support.design.widget.AppBarLayout import android.support.design.widget.CoordinatorLayout import android.support.design.widget.FloatingActionButton -import android.support.v7.app.AppCompatActivity import android.support.v7.widget.RecyclerView import android.support.v7.widget.Toolbar import android.transition.TransitionInflater diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt index 3c477c1..49e31a1 100644 --- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt +++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt @@ -21,7 +21,6 @@ import android.content.Context import android.graphics.Color import android.os.Build import android.support.annotation.RequiresApi -import android.support.v7.widget.RecyclerView import android.transition.TransitionInflater import android.util.AttributeSet import android.view.View diff --git a/core/src/androidTest/kotlin/ca/allanwang/kau/xml/ChangelogTest.kt b/core/src/androidTest/kotlin/ca/allanwang/kau/xml/ChangelogTest.kt index a3c9ff1..e3b3170 100644 --- a/core/src/androidTest/kotlin/ca/allanwang/kau/xml/ChangelogTest.kt +++ b/core/src/androidTest/kotlin/ca/allanwang/kau/xml/ChangelogTest.kt @@ -1,10 +1,7 @@ package ca.allanwang.kau.xml -import android.support.test.InstrumentationRegistry import android.support.test.filters.MediumTest import android.support.test.runner.AndroidJUnit4 -import ca.allanwang.kau.test.R -import org.junit.Test import org.junit.runner.RunWith /** diff --git a/core/src/main/kotlin/ca/allanwang/kau/ui/views/CollapsibleViewDelegate.kt b/core/src/main/kotlin/ca/allanwang/kau/ui/views/CollapsibleViewDelegate.kt index 6994ca2..514b483 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/ui/views/CollapsibleViewDelegate.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/ui/views/CollapsibleViewDelegate.kt @@ -37,7 +37,7 @@ interface CollapsibleView { class CollapsibleViewDelegate : CollapsibleView { private lateinit var viewRef: WeakReference<View> - private val view + private inline val view get() = viewRef.get() private var animator: ValueAnimator? = null diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/AnimUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/AnimUtils.kt index 5da21bb..5cef0ac 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/AnimUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/AnimUtils.kt @@ -126,4 +126,4 @@ import android.widget.TextView @KauUtils fun TextView.setTextWithFade(@StringRes textId: Int, duration: Long = 200, onFinish: (() -> Unit)? = null) = setTextWithFade(context.getString(textId), duration, onFinish) -@KauUtils inline fun ViewPropertyAnimator.scaleXY(value: Float) = scaleX(value).scaleY(value)
\ No newline at end of file +@KauUtils fun ViewPropertyAnimator.scaleXY(value: Float) = scaleX(value).scaleY(value)
\ No newline at end of file diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt index 16d1d01..d0e1f8f 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt @@ -149,6 +149,7 @@ fun Context.colorStateList(@ColorInt color: Int): ColorStateList { * Largely based on MDTintHelper * https://github.com/afollestad/material-dialogs/blob/master/core/src/main/java/com/afollestad/materialdialogs/internal/MDTintHelper.java */ +@SuppressLint("PrivateResource") fun RadioButton.tint(colors: ColorStateList) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { buttonTintList = colors @@ -162,6 +163,7 @@ fun RadioButton.tint(colors: ColorStateList) { fun RadioButton.tint(@ColorInt color: Int) = tint(context.colorStateList(color)) +@SuppressLint("PrivateResource") fun CheckBox.tint(colors: ColorStateList) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { buttonTintList = colors @@ -180,20 +182,13 @@ fun SeekBar.tint(@ColorInt color: Int) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { thumbTintList = s1 progressTintList = s1 - } else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.GINGERBREAD_MR1) { + } else { val progressDrawable = DrawableCompat.wrap(progressDrawable) this.progressDrawable = progressDrawable DrawableCompat.setTintList(progressDrawable, s1) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - val thumbDrawable = DrawableCompat.wrap(thumb) - DrawableCompat.setTintList(thumbDrawable, s1) - thumb = thumbDrawable - } - } else { - val mode: PorterDuff.Mode = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD_MR1) - PorterDuff.Mode.MULTIPLY else PorterDuff.Mode.SRC_IN - indeterminateDrawable?.setColorFilter(color, mode) - progressDrawable?.setColorFilter(color, mode) + val thumbDrawable = DrawableCompat.wrap(thumb) + DrawableCompat.setTintList(thumbDrawable, s1) + thumb = thumbDrawable } } @@ -204,8 +199,7 @@ fun ProgressBar.tint(@ColorInt color: Int, skipIndeterminate: Boolean = false) { secondaryProgressTintList = sl if (!skipIndeterminate) indeterminateTintList = sl } else { - val mode: PorterDuff.Mode = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD_MR1) - PorterDuff.Mode.MULTIPLY else PorterDuff.Mode.SRC_IN + val mode: PorterDuff.Mode = PorterDuff.Mode.SRC_IN indeterminateDrawable?.setColorFilter(color, mode) progressDrawable?.setColorFilter(color, mode) } diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/FileUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/FileUtils.kt index b03707d..b97f4aa 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/FileUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/FileUtils.kt @@ -1,12 +1,7 @@ package ca.allanwang.kau.utils -import android.content.Context -import android.os.Environment import java.io.File -import java.io.IOException import java.io.InputStream -import java.text.SimpleDateFormat -import java.util.* /** * Created by Allan Wang on 2017-08-04. diff --git a/core/src/main/res-public/values-vi/strings_commons.xml b/core/src/main/res-public/values-vi/strings_commons.xml new file mode 100644 index 0000000..e42087d --- /dev/null +++ b/core/src/main/res-public/values-vi/strings_commons.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<!--Generated by crowdin.com--> +<!-- +A collection of common string values +Most resources are verbatim and x represents a formatted item +--> +<resources> + <string name="kau_about_app">Giới thiệu</string> + <string name="kau_about_x">Giới thiệu về %s</string> + <string name="kau_add_account">Thêm tài khoản</string> + <string name="kau_back">Quay lại</string> + <string name="kau_cancel">Bỏ</string> + <string name="kau_changelog">Nhật ký thay đổi</string> + <string name="kau_close">Đóng</string> + <string name="kau_contact_us">Liên hệ với chúng tôi</string> + <string name="kau_copy">Sao chép</string> + <string name="kau_custom">Khác</string> + <string name="kau_dark">Tối</string> + <string name="kau_default">Mặc định</string> + <string name="kau_do_not_show_again">Không hiện lại</string> + <string name="kau_done">Xong</string> + <string name="kau_error">Lỗi</string> + <string name="kau_exit">Thoát</string> + <string name="kau_exit_confirmation">Bạn chắc chắn muốn thoát?</string> + <string name="kau_exit_confirmation_x">Bạn chắc chắn muốn thoát %s?</string> + <string name="kau_glass">Trong suốt</string> + <string name="kau_got_it">Được rồi</string> + <string name="kau_great">Tuyệt</string> + <string name="kau_hide">Ẩn</string> + <string name="kau_light">Sáng</string> + <string name="kau_login">Đăng nhập</string> + <string name="kau_logout">Đăng xuất</string> + <string name="kau_logout_confirm_as_x">Bạn chắc chắn muốn đăng xuất %s?</string> + <string name="kau_manage_account">Quản lý tài khoản</string> + <string name="kau_maybe">Có thể</string> + <string name="kau_menu">Menu</string> + <string name="kau_no">Không</string> + <string name="kau_no_results_found">Không tìm thấy kết quả nào</string> + <string name="kau_none">Trống</string> + <string name="kau_ok">OK</string> + <string name="kau_play_store">Cửa hàng Play</string> + <string name="kau_rate">Đánh giá</string> + <string name="kau_report_bug">Báo cáo lỗi</string> + <string name="kau_search">Tìm</string> + <string name="kau_send_feedback">Gửi phản hồi</string> + <string name="kau_send_via">Gửi bằng</string> + <string name="kau_settings">Thiết lập</string> + <string name="kau_share">Chia sẻ</string> + <string name="kau_text_copied">Đã chép vào bộ nhớ tạm.</string> + <string name="kau_thank_you">Cảm ơn</string> + <string name="kau_uh_oh">Ồ…</string> + <string name="kau_warning">Cảnh báo</string> + <plurals name="kau_x_days"> + <item quantity="other">%d ngày</item> + </plurals> + <plurals name="kau_x_hours"> + <item quantity="other">%d giờ</item> + </plurals> + <plurals name="kau_x_minutes"> + <item quantity="other">%d phút</item> + </plurals> + <plurals name="kau_x_seconds"> + <item quantity="other">%d giây</item> + </plurals> + <string name="kau_yes">Đồng ý</string> + <string name="kau_permission_denied">Quyền bị từ chối</string> +</resources> diff --git a/core/src/test/kotlin/ca/allanwang/kau/kotlin/DebounceTest.kt b/core/src/test/kotlin/ca/allanwang/kau/kotlin/DebounceTest.kt index 12bc5a4..05345bd 100644 --- a/core/src/test/kotlin/ca/allanwang/kau/kotlin/DebounceTest.kt +++ b/core/src/test/kotlin/ca/allanwang/kau/kotlin/DebounceTest.kt @@ -1,6 +1,5 @@ package ca.allanwang.kau.kotlin -import org.jetbrains.anko.doAsync import org.junit.Test import kotlin.test.assertEquals diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItem.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItem.kt index 0431465..486ee31 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItem.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItem.kt @@ -5,7 +5,6 @@ import android.support.v7.widget.RecyclerView import android.view.View import ca.allanwang.kau.iitems.KauIItem import ca.allanwang.kau.utils.bindView -import com.bumptech.glide.Glide import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.engine.GlideException import com.bumptech.glide.request.RequestListener diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt index 2d6cefa..fb2d383 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaItemBasic.kt @@ -2,16 +2,12 @@ package ca.allanwang.kau.mediapicker import android.annotation.SuppressLint import android.app.Activity -import android.content.Intent import android.graphics.drawable.Drawable -import android.support.v7.app.AppCompatActivity import android.support.v7.widget.RecyclerView import android.view.View import ca.allanwang.kau.iitems.KauIItem import ca.allanwang.kau.ui.views.MeasuredImageView import ca.allanwang.kau.utils.bindView -import ca.allanwang.kau.utils.buildIsLollipopAndUp -import com.bumptech.glide.Glide import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.engine.GlideException import com.bumptech.glide.request.RequestListener diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaUtils.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaUtils.kt index 0fb5824..f37be75 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaUtils.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaUtils.kt @@ -8,7 +8,6 @@ import android.net.Uri import android.os.Environment import android.support.v7.app.AppCompatActivity import ca.allanwang.kau.utils.buildIsLollipopAndUp -import com.mikepenz.fastadapter.IItem import java.io.File import java.io.IOException import java.text.SimpleDateFormat diff --git a/mediapicker/src/main/res/values-vi/strings_mediapicker.xml b/mediapicker/src/main/res/values-vi/strings_mediapicker.xml new file mode 100644 index 0000000..6dfcb82 --- /dev/null +++ b/mediapicker/src/main/res/values-vi/strings_mediapicker.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<resources> + <string name="kau_no_items_found">Không tìm thấy mục nào</string> + <string name="kau_no_items_selected">Chưa chọn mục nào</string> + <string name="kau_no_items_loaded">Không có mục nào</string> + <string name="kau_no_camera_found">Không tìm thấy máy ảnh</string> + <string name="kau_no_camera_found_content">Hãy cài một ứng dụng máy ảnh và thử lại.</string> + <string name="kau_temp_file_creation_failed">Không thể tạo tập tin tạm thời.</string> + <string name="kau_select_media">Chọn kiểu</string> +</resources> |