diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-13 02:17:59 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-12-13 02:17:59 +0100 |
commit | 37cccfb76ca994a5cf37b2248dce54e1b316ab03 (patch) | |
tree | e2febb55099517af31d436d0260f13a50d5f1a71 | |
parent | 1030b8578fa79c3b662d2806a370fbb83cc9a6a2 (diff) | |
parent | 5ad279bfaf041aea373051887babad8bc44e50c5 (diff) | |
download | packages_apps_LockClock-37cccfb76ca994a5cf37b2248dce54e1b316ab03.zip packages_apps_LockClock-37cccfb76ca994a5cf37b2248dce54e1b316ab03.tar.gz packages_apps_LockClock-37cccfb76ca994a5cf37b2248dce54e1b316ab03.tar.bz2 |
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_packages_apps_LockClock into replicant-6.0replicant-6.0-beta-0001replicant-6.0-alpha-0006
98 files changed, 2978 insertions, 2013 deletions
@@ -22,11 +22,10 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_SDK_VERSION := current LOCAL_PACKAGE_NAME := LockClock LOCAL_PROGUARD_FLAG_FILES := proguard.flags -LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dir)) LOCAL_AAPT_FLAGS := --auto-add-overlay -LOCAL_STATIC_JAVA_LIBRARIES := org.apache.http.legacy +LOCAL_STATIC_JAVA_LIBRARIES := org.cyanogenmod.platform.sdk include $(BUILD_PACKAGE) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 94e1a90..1a422e2 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -16,13 +16,11 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.cyanogenmod.lockclock" - android:versionCode="21" - android:versionName="3.4.1" > + android:versionCode="22" + android:versionName="3.5" > <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="23" /> - <permission android:name="com.cyanogenmod.lockclock.permission.READ_WEATHER" /> - <!-- Weather --> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> @@ -36,6 +34,9 @@ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> + <uses-permission android:name="cyanogenmod.permission.ACCESS_WEATHER_MANAGER" /> + <uses-permission android:name="cyanogenmod.permission.READ_WEATHER" /> + <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" @@ -98,16 +99,11 @@ <service android:name=".ClockWidgetService"></service> <service android:name=".weather.WeatherUpdateService"></service> + <service android:name=".weather.WeatherSourceListenerService"></service> <service android:name=".calendar.CalendarViewsService" android:permission="android.permission.BIND_REMOTEVIEWS"> </service> - <provider - android:name=".weather.WeatherContentProvider" - android:authorities="com.cyanogenmod.lockclock.weather.provider" - android:exported="true" - android:readPermission="com.cyanogenmod.lockclock.permission.READ_WEATHER" /> - </application> </manifest> diff --git a/proguard.flags b/proguard.flags index 0500c4b..cf70b67 100644 --- a/proguard.flags +++ b/proguard.flags @@ -24,14 +24,7 @@ } # Needed when building against the Marshmallow SDK --dontwarn org.apache.http.** --dontwarn android.support.** -dontwarn com.google.android.gms.** -# No webkit-related build errors --keep public class android.net.http.SslError --keep public class android.webkit.WebViewClient - --dontwarn android.webkit.WebView --dontwarn android.net.http.SslError --dontwarn android.webkit.WebViewClient +-dontwarn cyanogenmod.** +-keep class cyanogenmod.app.** { *; } diff --git a/res/layout-v17/clock_panel.xml b/res/layout-v17/clock_panel.xml index 0e48a43..6be3eed 100644 --- a/res/layout-v17/clock_panel.xml +++ b/res/layout-v17/clock_panel.xml @@ -100,9 +100,11 @@ android:layout_gravity="center_horizontal|top" /> <!-- AM/PM --> - <TextView + <TextClock android:id="@+id/clock_ampm" style="@style/label_thin" + android:format12Hour="@string/widget_12_hours_format_ampm" + android:format24Hour="@null" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" diff --git a/res/layout/forecast_activity.xml b/res/layout/forecast_activity.xml index 1ac7635..fe71b1c 100644 --- a/res/layout/forecast_activity.xml +++ b/res/layout/forecast_activity.xml @@ -31,9 +31,10 @@ android:gravity="center_vertical" android:orientation="vertical" > - <RelativeLayout + <LinearLayout android:layout_width="match_parent" android:layout_height="48dp" + android:weightSum="1" android:gravity="center_horizontal"> <TextView @@ -42,6 +43,9 @@ android:layout_height="match_parent" android:gravity="center|center_horizontal" android:singleLine="true" + android:ellipsize="end" + android:layout_weight="0.8" + android:paddingLeft="3dp" android:textAppearance="?android:attr/textAppearanceMedium" /> <ImageView @@ -52,8 +56,9 @@ android:layout_centerVertical="true" android:padding="8dp" android:src="@drawable/ic_menu_refresh" + android:layout_weight="0.2" android:background="?android:attr/selectableItemBackground" /> - </RelativeLayout> + </LinearLayout> <ImageView android:layout_width="match_parent" @@ -123,19 +128,29 @@ android:layout_centerHorizontal="true" android:textAppearance="?android:attr/textAppearanceLarge" /> + <TextView + android:id="@+id/weather_low_high" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@id/weather_temp" + android:layout_centerHorizontal="true" + android:paddingBottom="2dip" + android:textSize="12sp" + android:textColor="?android:attr/textColorPrimary" /> + <ImageView android:id="@+id/weather_divider" - android:layout_below="@id/weather_temp" + android:layout_below="@id/weather_low_high" android:layout_width="44dip" android:layout_height="1dip" android:layout_centerHorizontal="true" android:background="@android:drawable/divider_horizontal_dark" /> <TextView - android:id="@+id/weather_low_high" + android:id="@+id/weather_hum_wind" + android:layout_below="@id/weather_divider" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/weather_divider" android:layout_centerHorizontal="true" android:paddingTop="2dip" android:textSize="12sp" @@ -155,14 +170,28 @@ </RelativeLayout> <LinearLayout - android:id="@+id/forecast_view" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:paddingBottom="16dp" + android:layout_marginEnd="12dip" + android:layout_marginStart="12dip" android:gravity="center_horizontal" - android:orientation="horizontal" /> + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp"> + + <HorizontalScrollView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fadingEdgeLength="12dp" + android:requiresFadingEdge="horizontal" + android:scrollbars="none"> + + <LinearLayout + android:id="@+id/forecast_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" /> + </HorizontalScrollView> + </LinearLayout> <ProgressBar android:id="@+id/progress_indicator" diff --git a/res/layout/forecast_item.xml b/res/layout/forecast_item.xml index e030889..0741a50 100644 --- a/res/layout/forecast_item.xml +++ b/res/layout/forecast_item.xml @@ -18,7 +18,8 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent" - android:orientation="vertical" > + xmlns:tools="http://schemas.android.com/tools" + android:orientation="vertical"> <TextView android:id="@+id/forecast_day" @@ -33,16 +34,13 @@ <ImageView android:id="@+id/weather_image" - android:maxWidth="@dimen/forecast_icon_size" - android:layout_width="wrap_content" - android:layout_height="0dp" - android:layout_weight="1" + android:layout_width="@dimen/forecast_icon_size" + android:layout_height="@dimen/forecast_icon_size" android:layout_gravity="center_horizontal" - android:paddingTop="2dp" - android:paddingBottom="2dp" - android:scaleType="centerInside" android:adjustViewBounds="true" - android:src="@android:drawable/ic_dialog_alert"/> + android:padding="2dp" + android:scaleType="centerInside" + tools:ignore="ContentDescription" /> <TextView android:id="@+id/weather_temps" diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml index ed23ee4..eead900 100644 --- a/res/values-af/strings.xml +++ b/res/values-af/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Verfris tans\u2026</string> <string name="weather_last_sync_just_now">Sopas</string> <string name="weather_cannot_reach_provider">Kan nie %s bereik nie</string> + <string name="weather_source_not_selected">Geen weer bron gekies</string> + <string name="weather_tap_to_select_source">Raak om een te kies</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Handmatig</string> <string name="weather_refresh_30min">30 minute</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Geaktiveer</string> <string name="weather_enable">Weerpaneel sigbaar</string> <string name="weather_source_title">Weer bron</string> - <string name="weather_source_yahoo">Yahoo! Weer</string> <string name="weather_use_custom_location">Gebruik persoonlike ligging</string> <string name="weather_geolocated">Geoligging bepaal deur die netwerk</string> <string name="weather_custom_location_dialog_title">Voer ligging in</string> diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index f958122..c66fd67 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">تحديث</string> <string name="weather_last_sync_just_now">الآن للتو</string> <string name="weather_cannot_reach_provider">يتعذر الوصول إلى %s في هذه اللحظة</string> + <string name="weather_source_not_selected">لم يتم تحديد مصدر الطقس</string> + <string name="weather_tap_to_select_source">اضغط لتحديد واحد</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">يدوي</string> <string name="weather_refresh_30min">30 دقيقة</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">تمكين</string> <string name="weather_enable">عرض حالة الطقس</string> <string name="weather_source_title">مصدر الطقس</string> - <string name="weather_source_yahoo">ياهو! طقس</string> <string name="weather_use_custom_location">استخدام موقع مخصص</string> <string name="weather_geolocated">تحديد الموقع الجغرافي باستخدام الشبكة</string> <string name="weather_custom_location_dialog_title">إدخال الموقع</string> @@ -151,6 +152,7 @@ <string name="calendar_title">عرض الحدث القادم</string> <string name="calendars_title">تقويمات الحدث</string> <string name="calendars_summary">العثور على الأحداث من هذه التقويمات</string> + <string name="calendars_none_found_summary">لا توجد تقويمات</string> <string name="calendar_reminders_only_title">تذكيرات فقط</string> <string name="calendar_reminders_only_summary">تظهر الأحداث فقط مع التذكيرات</string> <string name="calendar_hide_allday_title">إخفاء أحداث اليوم كله</string> diff --git a/res/values-as-rIN/strings.xml b/res/values-as-rIN/strings.xml index bcbe820..cc0f4f6 100644 --- a/res/values-as-rIN/strings.xml +++ b/res/values-as-rIN/strings.xml @@ -17,32 +17,190 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> + <string name="unknown">অজ্ঞাত</string> + <string name="cancel">নাকচ</string> + <string name="loading_indicator">উইজেট লোডিং কৰি আছে\u2026</string> + <string name="menu_done">কৰা হল</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> + <string name="weather_0">ঘূৰ্ণিবতাহ</string> + <string name="weather_1">গ্ৰীষ্মকালীন ধুমুহা</string> + <string name="weather_2">বানপানী</string> + <string name="weather_3">তীব্ৰ ধুমুহা-বৰষুণ</string> + <string name="weather_4">ধুমুহা-বৰষুণ</string> + <string name="weather_5">মিশ্ৰিত বৰষুণ আৰু তুষাৰপাত</string> + <string name="weather_6">মিশ্ৰিত বৰষুণ আৰু শিলাবৃষ্টি</string> + <string name="weather_7">মিশ্ৰিত তুষাৰপাত আৰু শিলাবৃষ্টি</string> + <string name="weather_8">হিমশীতল কিনকিনীয়া বৰষুণ</string> + <string name="weather_9">কিনকিনীয়া বৰষুণ</string> + <string name="weather_10">হিমশীতল বৰষুণ</string> + <string name="weather_11">বৰষুণ</string> + <string name="weather_12">বৰষুণ</string> + <string name="weather_13">তুষাৰ বৃষ্টি</string> + <string name="weather_14">লঘূ তুষাৰ বৃষ্টি</string> + <string name="weather_15">ধূলিৰ তুষাৰপাত</string> + <string name="weather_16">বৰফ</string> + <string name="weather_17">ধূমুহা</string> + <string name="weather_18">শিলাবৃষ্টি</string> + <string name="weather_19">ধূলি</string> + <string name="weather_20">কুৱঁলী</string> + <string name="weather_21">কুঁৱলী</string> + <string name="weather_22">ধোঁৱাময়</string> + <string name="weather_23">হো-হোৱনি</string> + <string name="weather_24">ধূমুহাপূৰ্ণ</string> + <string name="weather_25">ঠাণ্ডা</string> + <string name="weather_26">ক্লাউডী</string> <!-- Night --> + <string name="weather_27">ঘাইকৈ মেঘাচ্ছন্ন</string> <!-- Day --> + <string name="weather_28">ঘাইকৈ মেঘাচ্ছন্ন</string> <!-- Night --> + <string name="weather_29">আংশিক মেঘাচ্ছন্ন</string> <!-- Day --> + <string name="weather_30">আংশিক মেঘাচ্ছন্ন</string> <!-- Night --> + <string name="weather_31">মুকলি কৰা</string> + <string name="weather_32">ৰ\'দ</string> <!-- Night --> + <string name="weather_33">ফেয়াৰ</string> <!-- Day --> + <string name="weather_34">ফেয়াৰ</string> + <string name="weather_35">মিশ্ৰিত বৰষুণ আৰু ধূমুহা</string> + <string name="weather_36">গৰম</string> + <string name="weather_37">বিচ্ছিন্ন গাজনি-ঢেৰেকনি</string> + <string name="weather_38">চেগাচোৰোকা গাজনি-ঢেৰেকনি</string> + <string name="weather_39">চেগাচোৰোকা গাজনি-ঢেৰেকনি</string> + <string name="weather_40">চেগাচোৰোকা বৰষুণ</string> + <string name="weather_41">প্ৰচণ্ড তুষাৰ</string> + <string name="weather_42">চেগাচোৰোকা তুষাৰ বৃষ্টি</string> + <string name="weather_43">প্ৰচণ্ড তুষাৰ</string> + <string name="weather_44">আংশিক মেঘাচ্ছন্ন</string> + <string name="weather_45">ব্ৰজবৃষ্টি</string> + <string name="weather_46">তুষাৰ বৃষ্টি</string> + <string name="weather_47">চেগাচোৰোকা ব্ৰজবৃষ্টি</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> + <string name="weather_kph">kph</string> + <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> + <string name="weather_N">N</string> + <string name="weather_NE">NE</string> + <string name="weather_E">E</string> + <string name="weather_SE">SE</string> + <string name="weather_S">S</string> + <string name="weather_SW">SW</string> + <string name="weather_W">W</string> + <string name="weather_NW">NW</string> <!-- Weather - Error messages --> + <string name="weather_no_data">ডাটা নাই</string> + <string name="weather_tap_to_refresh">সতেজ কৰিবলৈ টেপ কৰক</string> + <string name="weather_refreshing">সতেজকৰণ</string> + <string name="weather_last_sync_just_now">এইমাত্ৰ</string> + <string name="weather_cannot_reach_provider">এই মূহুৰ্তত %s ত উপনীত হ\'ব পৰা নাই</string> <!-- Weather - Update frequency --> + <string name="weather_refresh_manual">মেনুৱেল</string> + <string name="weather_refresh_30min">30 মিনিট</string> + <string name="weather_refresh_60min">60 মিনিট</string> + <string name="weather_refresh_2hrs">2 ঘন্টা</string> + <string name="weather_refresh_4hrs">4 ঘন্টা</string> + <string name="weather_refresh_6hrs">6 ঘন্টা</string> + <string name="weather_refresh_8hrs">8 ঘন্টা</string> <!-- Preferences - Categories --> + <string name="clock_category">ঘড়ী আৰু এলাৰ্ম</string> + <string name="weather_category">বতৰ পেনেল</string> + <string name="calendar_category">কেলেণ্ডাৰ ইভেণ্ট</string> <!-- Preferences - Categories --> + <string name="general_category">সাধাৰণ</string> + <string name="display_category">ডিছপ্লে’</string> <!-- Preferences - Clock --> + <string name="use_digital_clock_title">ডিজিটেল ঘড়ী ব্যৱহাৰ কৰক</string> + <string name="use_digital_clock_summary">ডিজিটেল আৰু এনালগ ঘড়ীৰ মাজত টগল কৰিবলৈ চয়ন কৰক</string> + <string name="clock_font_title">মোটা হৰফৰ ঘণ্টা</string> + <string name="clock_font_minutes_title">মোটা হৰফৰ মিনিট</string> + <string name="clock_font_date_title">মোটা হৰফৰ তাৰিখ আৰু এলাৰ্ম</string> + <string name="show_alarm_title">পৰৱৰ্তী এলাৰ্ম প্ৰদৰ্শন কৰক</string> + <string name="clock_am_pm_title">AM/PM সূচক প্ৰদৰ্শন কৰক</string> <!-- Preferences - Weather --> + <string name="weather_enabled">সক্ৰিয় কৰা হল</string> + <string name="weather_enable">বতৰ প্ৰদৰ্শন কৰক</string> + <string name="weather_source_title">বতৰৰ উৎস</string> + <string name="weather_use_custom_location">কাষ্টম অৱস্থান ব্যৱহাৰ কৰক</string> + <string name="weather_geolocated">জিঅ\'লোকেটেড এ নেটৱৰ্ক ব্যৱহাৰ কৰি আছে</string> + <string name="weather_custom_location_dialog_title">অৱস্থান প্ৰৱেশ কৰক</string> + <string name="weather_custom_location_hint">চহৰ, ৰাজ্য/দেশ</string> + <string name="weather_custom_location_title">স্থান</string> + <string name="weather_show_location_title">অৱস্থান প্ৰদৰ্শন কৰক</string> + <string name="weather_show_timestamp_title">টাইমষ্টাম্প প্ৰদৰ্শন কৰক</string> + <string name="weather_refresh_interval">ব্যৱধান আপডেট কৰক</string> + <string name="weather_use_metric">মেট্ৰিক ব্যৱহাৰ কৰক</string> + <string name="weather_retrieve_location_dialog_title">অৱস্থান পুনৰুদ্ধাৰ কৰিব পৰা নাই!</string> + <string name="weather_retrieve_location_dialog_message">নেটৱৰ্ক জিঅ\'লোকেচন অক্ষম কৰা আছে।\n\nকাষ্টম অৱস্থান ছেট কৰক বা নেটৱৰ্ক অৱস্থান সক্ষম কৰক।</string> + <string name="weather_retrieve_location_dialog_enable_button">সক্ৰিয় কৰা</string> + <string name="weather_invert_lowhigh">নিম্ন/উচ্চ তাপমাত্ৰা বিপৰীতমুখী কৰক</string> + <string name="weather_progress_title">অৱস্থান সত্যাপন কৰি আছে</string> + <string name="weather_alternate_icons_title">ৰঙীন আইকন ব্যৱহাৰ কৰক</string> + <string name="weather_alternate_icons_summary">ডিফ\'ল্ট (ৰং) আৰু বিকল্প (বগা) আইকনৰ মাজত টগল কৰিবলৈ চয়ন কৰক</string> + <string name="weather_show_when_minimized_title">মিনিমাইজ কৰিলে প্ৰদৰ্শন কৰক</string> + <string name="weather_show_when_minimized_summary">ৱিজেটটো মিনিমাইজ কৰিলে বতৰৰ তথ্যৰ সাৰাংশ প্ৰদৰ্শন কৰক</string> + <string name="weather_select_location">অৱ্স্থান চয়ন কৰক</string> <!-- Preferences - Calendar --> + <string name="calendar_title">পৰৱৰ্তী ইভেণ্টটো প্ৰদৰ্শন কৰক</string> + <string name="calendars_title">ইভেণ্ট কেলেণ্ডাৰ</string> + <string name="calendars_summary">এই কেলেণ্ডাৰবোৰৰ পৰা ইভেণ্ট বিচাৰক</string> + <string name="calendars_none_found_summary">এখনো কেলেণ্ডাৰ পোৱা নাই</string> + <string name="calendar_reminders_only_title">কেৱল স্মাৰক</string> + <string name="calendar_reminders_only_summary">কেৱল স্মাৰকৰ সৈতে ইভেণ্ট প্ৰদৰ্শন কৰক</string> + <string name="calendar_hide_allday_title">অল-ডে ইভেণ্ট লুকুৱাওক</string> + <string name="calendar_icon_title">কেলেণ্ডাৰ আইকন</string> + <string name="calendar_lookahead_title">ইভেণ্ট লুকএহেড</string> + <string name="calendar_show_location_title">ইভেণ্টৰ অৱস্থান</string> + <string name="calendar_show_description_title">ইভেণ্টৰ বৰ্ণনা</string> + <string name="calendar_upcoming_events_category">আহি থকা ইভেণ্ট</string> + <string name="calendar_highlight_upcoming_events_title">হাইলাইট কৰা ইভেণ্ট</string> + <string name="calendar_highlight_upcoming_events_summary">চলিত দিনটোৰ ইভেণ্টসমূহ আৰু 8 পিএমৰ পাছৰ আৰু পৰৱৰ্তী দিনটোৰ ইভেণ্টবোৰ হাইলাইট কৰক</string> + <string name="calendar_highlight_upcoming_events_bold">মোটা ফণ্ট</string> <!-- Preferences - Font colors --> + <string name="font_color">ফণ্টৰ ৰং</string> + <string name="font_color_alarm">এলাৰ্মৰ ফণ্টৰ ৰং</string> + <string name="font_color_timestamp">টাইমষ্টাম্পৰ ফণ্টৰ ৰং</string> + <string name="font_color_calendar_details">ফণ্টৰ ৰং বিৱৰণ</string> <!-- Preferences - Background color --> + <string name="background_color">বেকগ্ৰাউণ্ড ৰং</string> + <string name="background_transparency">পৃষ্ঠভূমিৰ স্বচ্ছতা</string> <!-- Calendar - Lookahead --> + <string name="calendar_lookahead_3hrs">3 ঘন্টা</string> + <string name="calendar_lookahead_6hrs">6 ঘন্টা</string> + <string name="calendar_lookahead_12hrs">12 ঘন্টা</string> + <string name="calendar_lookahead_today">আজি</string> + <string name="calendar_lookahead_1day">1 দিন</string> + <string name="calendar_lookahead_3days">3 দিন</string> + <string name="calendar_lookahead_1wk">1 সপ্তাহ</string> + <string name="calendar_lookahead_2wks">2 সপ্তাহ</string> + <string name="calendar_lookahead_4wks">4 সপ্তাহ</string> <!-- Calendar - Event metadata --> + <string name="calendar_metadata_none">নেদেখুৱাব</string> + <string name="calendar_metadata_first_line">প্ৰথম শাৰী প্ৰদৰ্শন কৰক</string> + <string name="calendar_metadata_all">আটাইবোৰ প্ৰদৰ্শন কৰক</string> <!-- Font colors --> + <string name="white">বগা</string> + <string name="grey">ধূঁসৰ</string> + <string name="black">ক\'লা</string> + <string name="holo_blue_light">পাতল নীলা</string> + <string name="holo_green_light">পাতল সেউজীয়া</string> + <string name="holo_red_light">পাতল ৰঙা</string> + <string name="holo_blue_dark">গাঢ় নীলা</string> + <string name="holo_green_dark">গাঢ় সেউজীয়া</string> + <string name="holo_red_dark">গাঢ় ৰঙা</string> + <string name="holo_purple">বেঙুনীয়া</string> + <string name="holo_orange_light">পাতল কমলা</string> + <string name="holo_orange_dark">গাঢ় কমলা</string> + <string name="holo_blue_bright">উজ্জ্বল নীলা</string> <!-- Weather icon sets --> + <string name="weather_icon_set_title">আইকন ছেট</string> + <string name="weather_icons_standard">ৰঙীন</string> + <string name="weather_icons_monochrome">মন\'ক্ৰম</string> + <string name="icon_set_selection_get_more">অধিক পাওক\u2026</string> </resources> diff --git a/res/values-ast-rES/strings.xml b/res/values-ast-rES/strings.xml index 2fc1eb9..df02b0e 100644 --- a/res/values-ast-rES/strings.xml +++ b/res/values-ast-rES/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Anovando\u2026</string> <string name="weather_last_sync_just_now">Agora</string> <string name="weather_cannot_reach_provider">Imposible algamar %s pel momentu</string> + <string name="weather_source_not_selected">Nun s\'esbilló una fonte meteorolóxica</string> + <string name="weather_tap_to_select_source">Calca pa esbillar una</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manual</string> <string name="weather_refresh_30min">30 minutos</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Activáu</string> <string name="weather_enable">Amosar clima</string> <string name="weather_source_title">Orixe meteorolóxicu</string> - <string name="weather_source_yahoo">El Tiempu de Yahoo!</string> <string name="weather_use_custom_location">Usar llocalización personalizada</string> <string name="weather_geolocated">Xeollocalización por rede</string> <string name="weather_custom_location_dialog_title">Introducir llocalización</string> @@ -151,6 +152,7 @@ <string name="calendar_title">Amosar próximu eventu</string> <string name="calendars_title">Calendariu d\'eventos</string> <string name="calendars_summary">Guetar eventos nos calendarios</string> + <string name="calendars_none_found_summary">Nun s\'alcontraron calendarios</string> <string name="calendar_reminders_only_title">Namái recordatorios</string> <string name="calendar_reminders_only_summary">Amosar namái eventos con recordatorios</string> <string name="calendar_hide_allday_title">Anubrir eventos \u00ABtol día\u00BB</string> diff --git a/res/values-az-rAZ/strings.xml b/res/values-az-rAZ/strings.xml index 324b429..64fe45c 100644 --- a/res/values-az-rAZ/strings.xml +++ b/res/values-az-rAZ/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Fəallaşdırıldı</string> <string name="weather_enable">Hava durumunu göstər</string> <string name="weather_source_title">Hava mənbəsi</string> - <string name="weather_source_yahoo">Yahoo! Hava</string> <string name="weather_use_custom_location">Özəl yer istifadə et</string> <string name="weather_geolocated">Şəbəkədən istifadə edilərək coğrafi yerləşdirildi</string> <string name="weather_custom_location_dialog_title">Məkan daxil edin</string> diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml index a944cdc..d5aae56 100644 --- a/res/values-be/strings.xml +++ b/res/values-be/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Уключана</string> <string name="weather_enable">Паказваць надвор\'е</string> <string name="weather_source_title">Сервер надвор\'я</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Не вызначаць аўтаматычна</string> <string name="weather_geolocated">Месцазнаходжанне па сетцы</string> <string name="weather_custom_location_dialog_title">Увядзіце месцазнаходжанне</string> @@ -135,7 +134,7 @@ <string name="weather_custom_location_title">Месцазнаходжанне</string> <string name="weather_show_location_title">Паказваць месцазнаходжанне</string> <string name="weather_show_timestamp_title">Паказваць час</string> - <string name="weather_refresh_interval">Часціня абновы</string> + <string name="weather_refresh_interval">Абнаўляць кожныя</string> <string name="weather_use_metric">Метрычная сістэма</string> <string name="weather_retrieve_location_dialog_title">Не атрымоўваецца атрымаць месцазнаходжанне!</string> <string name="weather_retrieve_location_dialog_message">Вызначэнне месцазнаходжання па сетцы вымкнута.\n\nУключыце вызначэнне месцазнаходжання па сетцы ці ўвядзіце месцазнаходжанне ручна</string> @@ -144,13 +143,14 @@ <string name="weather_progress_title">Праверка месцазнаходжання</string> <string name="weather_alternate_icons_title">Колеравыя абразкі</string> <string name="weather_alternate_icons_summary">Выбар паміж абразкамі па змаўчанні (колеравыя) ці альтэрнатыўнымі (белыя)</string> - <string name="weather_show_when_minimized_title">Паказваць заўсёды\"</string> + <string name="weather_show_when_minimized_title">Паказваць заўсёды</string> <string name="weather_show_when_minimized_summary">Адлюстроўваць надвор\'е, калі віджэт у згорнутым стане</string> <string name="weather_select_location">Выберыце месцазнаходжанне</string> <!-- Preferences - Calendar --> <string name="calendar_title">Паказваць падзеі</string> <string name="calendars_title">Падзеі каляндароў</string> <string name="calendars_summary">Паказваць падзеі з гэтых каляндароў</string> + <string name="calendars_none_found_summary">Каляндары не знойдзены</string> <string name="calendar_reminders_only_title">Толькі з нагаданнямі</string> <string name="calendar_reminders_only_summary">Адлюстроўваць толькі падзеі з нагаданнямі</string> <string name="calendar_hide_allday_title">Схаваць падзеі на ўвесь дзень\"</string> diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml index 7087065..87fbdc5 100644 --- a/res/values-bg/strings.xml +++ b/res/values-bg/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Обновяване</string> <string name="weather_last_sync_just_now">Точно сега</string> <string name="weather_cannot_reach_provider">Не може да достигнете до %s в този момент</string> + <string name="weather_source_not_selected">Няма избран източник на време</string> + <string name="weather_tap_to_select_source">Натиснете, за да изберете</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Ръчно</string> <string name="weather_refresh_30min">30 минути</string> @@ -125,9 +127,8 @@ <string name="clock_am_pm_title">Покажи индикатора AM/PM</string> <!-- Preferences - Weather --> <string name="weather_enabled">Разрешено</string> - <string name="weather_enable">Покажи на времето</string> + <string name="weather_enable">Показване на времето</string> <string name="weather_source_title">Източник за проверка на времето</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Местоположение по избор</string> <string name="weather_geolocated">Геолокализация по мрежата</string> <string name="weather_custom_location_dialog_title">Въведете местоположение</string> @@ -139,7 +140,7 @@ <string name="weather_use_metric">Използвай метрична система</string> <string name="weather_retrieve_location_dialog_title">Не може да извлече местоположението ви!</string> <string name="weather_retrieve_location_dialog_message">Мрежовата геолокация е деактивирана.\n\nЗадайте местоположение по избор или активирайте мрежовата геолокация</string> - <string name="weather_retrieve_location_dialog_enable_button">Активирана</string> + <string name="weather_retrieve_location_dialog_enable_button">Активирай</string> <string name="weather_invert_lowhigh">Обръщане на ниски / високи температури</string> <string name="weather_progress_title">Проверка на местоположението</string> <string name="weather_alternate_icons_title">Използвай цвятни икони</string> diff --git a/res/values-bs-rBA/strings.xml b/res/values-bs-rBA/strings.xml new file mode 100644 index 0000000..bcbe820 --- /dev/null +++ b/res/values-bs-rBA/strings.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2012-2014 The CyanogenMod Project (DvTonder) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- General strings --> + <!-- Formating strings for widget clock --> + <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and + android.text.format.DateFormat uses k for hours in the 0-23 range. + We need to support both --> + <!-- Weather - Weather codes --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Night --> + <!-- Day --> + <!-- Forecast unavailable --> + <!-- Weather - Speed units --> + <!-- Weather - Wind directions --> + <!-- Weather - Error messages --> + <!-- Weather - Update frequency --> + <!-- Preferences - Categories --> + <!-- Preferences - Categories --> + <!-- Preferences - Clock --> + <!-- Preferences - Weather --> + <!-- Preferences - Calendar --> + <!-- Preferences - Font colors --> + <!-- Preferences - Background color --> + <!-- Calendar - Lookahead --> + <!-- Calendar - Event metadata --> + <!-- Font colors --> + <!-- Weather icon sets --> +</resources> diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index 7b76831..9268c89 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Actualitzant</string> <string name="weather_last_sync_just_now">Ara</string> <string name="weather_cannot_reach_provider">No es pot contactar amb %s en aquest moment</string> + <string name="weather_source_not_selected">No s\'ha seleccionat cap proveïdor meteorològic</string> + <string name="weather_tap_to_select_source">Pica per seleccionar-ne un</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manual</string> <string name="weather_refresh_30min">30 minuts</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Activada</string> <string name="weather_enable">Mostra el temps</string> <string name="weather_source_title">Origen meteorològic</string> - <string name="weather_source_yahoo">Temps de Yahoo!</string> <string name="weather_use_custom_location">Utilitza una ubic. personalitzada</string> <string name="weather_geolocated">Geolocalitzat utilitzant la xarxa</string> <string name="weather_custom_location_dialog_title">Introdueix ubicació</string> diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 5d6ba9d..035ff37 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Obnovování</string> <string name="weather_last_sync_just_now">Právě teď</string> <string name="weather_cannot_reach_provider">Server %s nedostupný</string> + <string name="weather_source_not_selected">Není vybrán žádný zdroj počasí</string> + <string name="weather_tap_to_select_source">Dotykem vybrat</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Ručně</string> <string name="weather_refresh_30min">30 minut</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Použít</string> <string name="weather_enable">Zobrazit počasí</string> <string name="weather_source_title">Poskytovatel informací o počasí</string> - <string name="weather_source_yahoo">Počasí Yahoo!</string> <string name="weather_use_custom_location">Použít vlastní polohu</string> <string name="weather_geolocated">Zjistit polohu ze sítě</string> <string name="weather_custom_location_dialog_title">Zadat polohu</string> diff --git a/res/values-csb-rPL/strings.xml b/res/values-csb-rPL/strings.xml new file mode 100644 index 0000000..bcbe820 --- /dev/null +++ b/res/values-csb-rPL/strings.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2012-2014 The CyanogenMod Project (DvTonder) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- General strings --> + <!-- Formating strings for widget clock --> + <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and + android.text.format.DateFormat uses k for hours in the 0-23 range. + We need to support both --> + <!-- Weather - Weather codes --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Night --> + <!-- Day --> + <!-- Forecast unavailable --> + <!-- Weather - Speed units --> + <!-- Weather - Wind directions --> + <!-- Weather - Error messages --> + <!-- Weather - Update frequency --> + <!-- Preferences - Categories --> + <!-- Preferences - Categories --> + <!-- Preferences - Clock --> + <!-- Preferences - Weather --> + <!-- Preferences - Calendar --> + <!-- Preferences - Font colors --> + <!-- Preferences - Background color --> + <!-- Calendar - Lookahead --> + <!-- Calendar - Event metadata --> + <!-- Font colors --> + <!-- Weather icon sets --> +</resources> diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index c3f68b9..af0f8bb 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Opdaterer</string> <string name="weather_last_sync_just_now">Lige nu</string> <string name="weather_cannot_reach_provider">Kan ikke nå %s</string> + <string name="weather_source_not_selected">Ingen vejrkilde valgt</string> + <string name="weather_tap_to_select_source">Tryk for at vælge en</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manuel</string> <string name="weather_refresh_30min">30 minutter</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Aktiveret</string> <string name="weather_enable">Vis vejr</string> <string name="weather_source_title">Vejrkilde</string> - <string name="weather_source_yahoo">Yahoo! Vejret</string> <string name="weather_use_custom_location">Brug alternativ lokation</string> <string name="weather_geolocated">Geolokation med netværk</string> <string name="weather_custom_location_dialog_title">Indtast lokation</string> @@ -151,6 +152,7 @@ <string name="calendar_title">Vis næste begivenhed</string> <string name="calendars_title">Kalendere</string> <string name="calendars_summary">Find begivenheder fra disse kalendere</string> + <string name="calendars_none_found_summary">Ingen kalendere fundet</string> <string name="calendar_reminders_only_title">Kun påmindelser</string> <string name="calendar_reminders_only_summary">Vis kun begivenheder med påmindelser</string> <string name="calendar_hide_allday_title">Skjul heldags begivenheder</string> diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 19c3f2a..200c5bb 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Aktualisierung</string> <string name="weather_last_sync_just_now">Gerade jetzt</string> <string name="weather_cannot_reach_provider">%s ist momentan nicht erreichbar.</string> + <string name="weather_source_not_selected">Kein Wetterdienst ausgewählt</string> + <string name="weather_tap_to_select_source">Tippen, um eine Auswahl zu treffen</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manuell</string> <string name="weather_refresh_30min">30 Minuten</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Aktiviert</string> <string name="weather_enable">Wetter anzeigen</string> <string name="weather_source_title">Wetterdienst</string> - <string name="weather_source_yahoo">Yahoo! Wetter</string> <string name="weather_use_custom_location">Benutzerdefinierter Standort</string> <string name="weather_geolocated">Geolokalisiert über das Netz</string> <string name="weather_custom_location_dialog_title">Standort eingeben</string> diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index ce408fc..4e47dee 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Γίνεται ανανέωση</string> <string name="weather_last_sync_just_now">Μόλις τώρα</string> <string name="weather_cannot_reach_provider">Αδύνατη η σύνδεση με %s αυτή τη στιγμή</string> + <string name="weather_source_not_selected">Δεν έχει επιλεχθεί πηγή καιρού</string> + <string name="weather_tap_to_select_source">Πιέστε για επιλογή</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Χειροκίνητα</string> <string name="weather_refresh_30min">30 λεπτά</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Ενεργό</string> <string name="weather_enable">Εμφάνιση καιρού</string> <string name="weather_source_title">Πηγή καιρού</string> - <string name="weather_source_yahoo">Καιρός Yahoo!</string> <string name="weather_use_custom_location">Χρήση προσαρμοσμένης τοποθεσίας</string> <string name="weather_geolocated">Εντοπισμός τοποθεσίας μέσω δικτύου</string> <string name="weather_custom_location_dialog_title">Εισάγετε τοποθεσία</string> diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml index a4e227a..0d153e4 100644 --- a/res/values-en-rAU/strings.xml +++ b/res/values-en-rAU/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Enabled</string> <string name="weather_enable">Display weather</string> <string name="weather_source_title">Weather source</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Use custom location</string> <string name="weather_geolocated">Geolocated using network</string> <string name="weather_custom_location_dialog_title">Enter location</string> diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml index 812c76f..2341566 100644 --- a/res/values-en-rIN/strings.xml +++ b/res/values-en-rIN/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Enabled</string> <string name="weather_enable">Display weather</string> <string name="weather_source_title">Weather source</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Use custom location</string> <string name="weather_geolocated">Geolocated using network</string> <string name="weather_custom_location_dialog_title">Enter location</string> diff --git a/res/values-eo/strings.xml b/res/values-eo/strings.xml index a7a8bd7..c427727 100644 --- a/res/values-eo/strings.xml +++ b/res/values-eo/strings.xml @@ -18,90 +18,24 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> <string name="unknown">Nekonata</string> - <string name="cancel">Rezigni</string> - <string name="loading_indicator">Ŝarĝado de de fenestraĵo\u2026</string> - <string name="menu_done">Finite</string> + <string name="cancel">Nuligi</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> - <string name="weather_0">Tornado</string> - <string name="weather_1">Tropika ŝtormo</string> - <string name="weather_2">Uragano</string> - <string name="weather_3">Gravaj fulmotondroj</string> - <string name="weather_4">Fulmotondroj</string> - <string name="weather_5">Pluvo kaj neĝo</string> - <string name="weather_6">Pluvo kaj glacipluvo</string> - <string name="weather_7">Neĝo kaj glacipluvo</string> - <string name="weather_8">Glaciiga pluveto</string> - <string name="weather_9">Pluveto</string> - <string name="weather_10">Glaciiga pluvo</string> - <string name="weather_11">Pluvoverŝoj</string> - <string name="weather_12">Pluvoverŝoj</string> - <string name="weather_13">Neĝverŝoj</string> - <string name="weather_14">Neĝverŝetoj</string> - <string name="weather_15">Venta neĝo</string> - <string name="weather_16">Neĝo</string> - <string name="weather_17">Hajlo</string> - <string name="weather_18">Glacipluvo</string> - <string name="weather_19">Polvo</string> - <string name="weather_20">Nebula</string> - <string name="weather_21">Nebulo</string> - <string name="weather_22">Fumnebulo</string> - <string name="weather_23">Ventego</string> - <string name="weather_24">Venta</string> - <string name="weather_25">Malvarma</string> - <string name="weather_26">Nuba</string> <!-- Night --> - <string name="weather_27">Nubega</string> <!-- Day --> - <string name="weather_28">Nubega</string> <!-- Night --> - <string name="weather_29">Parte nuba</string> <!-- Day --> - <string name="weather_30">Parte nuba</string> <!-- Night --> - <string name="weather_31">Forviŝi</string> - <string name="weather_32">Suna</string> <!-- Night --> - <string name="weather_33">Akcepteble</string> <!-- Day --> - <string name="weather_34">Akcepteble</string> - <string name="weather_35">Pluvo kaj hajlo</string> - <string name="weather_36">Varma</string> - <string name="weather_37">Izolitaj fulmotondroj</string> - <string name="weather_38">Dissemitaj fulmotondroj</string> - <string name="weather_39">Dissemitaj fulmotondroj</string> - <string name="weather_40">Dissemitaj pluvoverŝoj</string> - <string name="weather_41">Forta neĝo</string> - <string name="weather_42">Dissemitaj neĝoverŝoj</string> - <string name="weather_43">Forta neĝo</string> - <string name="weather_44">Parta nuba</string> - <string name="weather_45">Fulmotondraj pluvegoj</string> - <string name="weather_46">Neĝoverŝoj</string> - <string name="weather_47">Izolitaj fulmotondraj pluvegoj</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> - <string name="weather_kph">km/h</string> - <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> - <string name="weather_N">N</string> - <string name="weather_NE">NOr</string> - <string name="weather_E">Or</string> - <string name="weather_SE">SOr</string> - <string name="weather_S">S</string> - <string name="weather_SW">SOk</string> - <string name="weather_W">Ok</string> - <string name="weather_NW">NOk</string> <!-- Weather - Error messages --> - <string name="weather_no_data">Neniu datumo</string> - <string name="weather_tap_to_refresh">Tuŝetu por aktualigi</string> - <string name="weather_refreshing">Aktualigo</string> - <string name="weather_last_sync_just_now">Nur nun</string> - <string name="weather_cannot_reach_provider">%s ne atingeblas nuntempe</string> <!-- Weather - Update frequency --> - <string name="weather_refresh_manual">Mane</string> <string name="weather_refresh_30min">30 minutoj</string> <string name="weather_refresh_60min">60 minutoj</string> <string name="weather_refresh_2hrs">2 horoj</string> @@ -109,64 +43,12 @@ <string name="weather_refresh_6hrs">6 horoj</string> <string name="weather_refresh_8hrs">8 horoj</string> <!-- Preferences - Categories --> - <string name="clock_category">Horloĝo kaj alarmo</string> - <string name="weather_category">Vetero</string> - <string name="calendar_category">Kalendaraj eventoj</string> <!-- Preferences - Categories --> - <string name="general_category">Ĝeneralo</string> - <string name="display_category">Ekrano</string> <!-- Preferences - Clock --> - <string name="use_digital_clock_title">Uzi ciferan horloĝon</string> - <string name="use_digital_clock_summary">Baskuligi inter cifera kaj analoga horo</string> - <string name="clock_font_title">Grasigitaj horoj</string> - <string name="clock_font_minutes_title">Grasigitaj minutoj</string> - <string name="clock_font_date_title">Grasigita dato kaj alarmo</string> - <string name="show_alarm_title">Montri venontan alarmon</string> - <string name="clock_am_pm_title">Montri AM/PM indikilon</string> <!-- Preferences - Weather --> - <string name="weather_enabled">Ŝaltita</string> - <string name="weather_enable">Montri veteron</string> - <string name="weather_source_title">Vetera fonto</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> - <string name="weather_use_custom_location">Uzi propran lokon</string> - <string name="weather_geolocated">Uzi geolokigilon</string> - <string name="weather_custom_location_dialog_title">Entajpu lokon</string> - <string name="weather_custom_location_hint">Urbo, Ŝtato/Lando</string> - <string name="weather_custom_location_title">Lokigo</string> - <string name="weather_show_location_title">Montri lokon</string> - <string name="weather_show_timestamp_title">Montri tempindikon</string> - <string name="weather_refresh_interval">Intervalo de ĝisdatigo</string> - <string name="weather_use_metric">Uzi metran sistemon</string> - <string name="weather_retrieve_location_dialog_title">Loko ne troveblas!</string> - <string name="weather_retrieve_location_dialog_message">Reta geolokigilo malŝaltita.\n\nAgordu propran lokon aŭ ebligu geolokigon</string> - <string name="weather_retrieve_location_dialog_enable_button">Ŝalti</string> - <string name="weather_invert_lowhigh">Inversigi min/maks. temperaturojn</string> - <string name="weather_progress_title">Kontrolado de loko</string> - <string name="weather_alternate_icons_title">Uzi kolorigitajn piktogramojn</string> - <string name="weather_alternate_icons_summary">Uzi tion por baskuligi la defaŭltan (koloriga) kaj la alternativan (blanka) piktogramon</string> - <string name="weather_show_when_minimized_title">Montri kiam minimumiga</string> - <string name="weather_show_when_minimized_summary">Montri resumitajn informojn pri vetero kiam la fenestraĵo estas minimumigita</string> - <string name="weather_select_location">Elekti lokon</string> + <string name="weather_custom_location_title">Loko</string> <!-- Preferences - Calendar --> - <string name="calendar_title">Montri venontan eventon</string> - <string name="calendars_title">Kalendara evento</string> - <string name="calendars_summary">Trovi eventon el tiuj kalendaroj</string> - <string name="calendar_reminders_only_title">Nur kun memorigiloj</string> - <string name="calendar_reminders_only_summary">Montri nur eventojn kun memorigilo</string> - <string name="calendar_hide_allday_title">Kaŝi tuttagajn eventojn</string> - <string name="calendar_icon_title">Kalendara piktogramo</string> - <string name="calendar_lookahead_title">Antaŭvido de eventoj</string> - <string name="calendar_show_location_title">Eventa loko</string> - <string name="calendar_show_description_title">Eventa priskribo</string> - <string name="calendar_upcoming_events_category">Venontaj eventoj</string> - <string name="calendar_highlight_upcoming_events_title">Markitaj eventoj</string> - <string name="calendar_highlight_upcoming_events_summary">Marki la ĉi-tagajn eventojn kaj, post la 20a, ankaŭ la morgaŭ-aj</string> - <string name="calendar_highlight_upcoming_events_bold">Grasigita tiparo</string> <!-- Preferences - Font colors --> - <string name="font_color">Tipara koloro</string> - <string name="font_color_alarm">Koloro de la alarma tiparo</string> - <string name="font_color_timestamp">Tipara koloro de la tempindiko</string> - <string name="font_color_calendar_details">Tipara koloro de la detaloj</string> <!-- Preferences - Background color --> <!-- Calendar - Lookahead --> <string name="calendar_lookahead_3hrs">3 horoj</string> @@ -179,26 +61,6 @@ <string name="calendar_lookahead_2wks">2 semajnoj</string> <string name="calendar_lookahead_4wks">4 semajnoj</string> <!-- Calendar - Event metadata --> - <string name="calendar_metadata_none">Ne montri</string> - <string name="calendar_metadata_first_line">Montri la unuan linion</string> - <string name="calendar_metadata_all">Montri ĉion</string> <!-- Font colors --> - <string name="white">Blanko</string> - <string name="grey">Griza</string> - <string name="black">Nigra</string> - <string name="holo_blue_light">Helblua</string> - <string name="holo_green_light">Helverda</string> - <string name="holo_red_light">Helruĝa</string> - <string name="holo_blue_dark">Malhelblua</string> - <string name="holo_green_dark">Malhelverda</string> - <string name="holo_red_dark">Malhelruĝa</string> - <string name="holo_purple">Purpura</string> - <string name="holo_orange_light">Heloranĝa</string> - <string name="holo_orange_dark">Malheloranĝa</string> - <string name="holo_blue_bright">Blua</string> <!-- Weather icon sets --> - <string name="weather_icon_set_title">Piktogramaro</string> - <string name="weather_icons_standard">Kolorigita</string> - <string name="weather_icons_monochrome">Unukolora</string> - <string name="icon_set_selection_get_more">Pliaj\u2026</string> </resources> diff --git a/res/values-es-rCO/strings.xml b/res/values-es-rCO/strings.xml new file mode 100644 index 0000000..bcbe820 --- /dev/null +++ b/res/values-es-rCO/strings.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2012-2014 The CyanogenMod Project (DvTonder) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- General strings --> + <!-- Formating strings for widget clock --> + <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and + android.text.format.DateFormat uses k for hours in the 0-23 range. + We need to support both --> + <!-- Weather - Weather codes --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Night --> + <!-- Day --> + <!-- Forecast unavailable --> + <!-- Weather - Speed units --> + <!-- Weather - Wind directions --> + <!-- Weather - Error messages --> + <!-- Weather - Update frequency --> + <!-- Preferences - Categories --> + <!-- Preferences - Categories --> + <!-- Preferences - Clock --> + <!-- Preferences - Weather --> + <!-- Preferences - Calendar --> + <!-- Preferences - Font colors --> + <!-- Preferences - Background color --> + <!-- Calendar - Lookahead --> + <!-- Calendar - Event metadata --> + <!-- Font colors --> + <!-- Weather icon sets --> +</resources> diff --git a/res/values-es-rMX/strings.xml b/res/values-es-rMX/strings.xml index bcbe820..7c88c70 100644 --- a/res/values-es-rMX/strings.xml +++ b/res/values-es-rMX/strings.xml @@ -39,6 +39,7 @@ <!-- Preferences - Clock --> <!-- Preferences - Weather --> <!-- Preferences - Calendar --> + <string name="calendars_none_found_summary">No se encontraron calendarios</string> <!-- Preferences - Font colors --> <!-- Preferences - Background color --> <!-- Calendar - Lookahead --> diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml index 8ad0d1a..2084693 100644 --- a/res/values-es-rUS/strings.xml +++ b/res/values-es-rUS/strings.xml @@ -17,23 +17,42 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> + <string name="unknown">Desconocido</string> + <string name="cancel">Cancelar</string> + <string name="loading_indicator">Cargando widget\u2026</string> <string name="menu_done">OK</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> + <string name="weather_0">Tornado</string> <string name="weather_1">Tormenta tropical</string> + <string name="weather_2">Huracán</string> <string name="weather_3">Tormentas intensas</string> <string name="weather_4">Tormentas eléctricas</string> <string name="weather_5">Lluvia y nieve</string> <string name="weather_6">Lluvia y aguanieve</string> <string name="weather_7">Nieve y aguanieve</string> <string name="weather_8">Llovizna helada</string> + <string name="weather_9">Llovizna</string> <string name="weather_10">Lluvia helada</string> + <string name="weather_11">Chubascos</string> + <string name="weather_12">Chubascos</string> <string name="weather_13">Copos de nieve</string> <string name="weather_14">Nieve ligera</string> <string name="weather_15">Ventisca con nieve</string> + <string name="weather_16">Nieve</string> + <string name="weather_17">Granizo</string> + <string name="weather_18">Aguanieve</string> + <string name="weather_19">Polvo</string> + <string name="weather_20">Niebla</string> + <string name="weather_21">Neblina</string> + <string name="weather_22">Humo</string> + <string name="weather_23">Borrascoso</string> + <string name="weather_24">Ventoso</string> + <string name="weather_25">Frío</string> + <string name="weather_26">Nublado</string> <!-- Night --> <string name="weather_27">Mayormente nublado</string> <!-- Day --> @@ -43,11 +62,14 @@ <!-- Day --> <string name="weather_30">Parcialmente nublado</string> <!-- Night --> + <string name="weather_31">Despejado</string> + <string name="weather_32">Soleado</string> <!-- Night --> <string name="weather_33">Buen tiempo</string> <!-- Day --> <string name="weather_34">Buen tiempo</string> <string name="weather_35">Lluvia y granizo</string> + <string name="weather_36">Caluroso</string> <string name="weather_37">Tormentas eléctricas aisladas</string> <string name="weather_38">Tormentas eléctricas dispersas</string> <string name="weather_39">Tormentas eléctricas dispersas</string> @@ -56,30 +78,131 @@ <string name="weather_42">Chubascos con nieve dispersos</string> <string name="weather_43">Fuertes nevadas</string> <string name="weather_44">Parcialmente nublado</string> + <string name="weather_45">Chaparrones</string> <string name="weather_46">Chubascos con nieve</string> <string name="weather_47">Chaparrones aislados</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> + <string name="weather_kph">kph</string> + <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> + <string name="weather_N">N</string> + <string name="weather_NE">NE</string> + <string name="weather_E">E</string> + <string name="weather_SE">SE</string> + <string name="weather_S">S</string> + <string name="weather_SW">SO</string> + <string name="weather_W">O</string> + <string name="weather_NW">NO</string> <!-- Weather - Error messages --> + <string name="weather_no_data">No hay datos</string> <string name="weather_tap_to_refresh">Pulsa para actualizar</string> + <string name="weather_refreshing">Actualizando</string> + <string name="weather_last_sync_just_now">Ahora</string> + <string name="weather_cannot_reach_provider">No se puede conectar con %s por el momento</string> + <string name="weather_source_not_selected">No ha seleccionado ningún proveedor meteorológico</string> + <string name="weather_tap_to_select_source">Pulsa para seleccionar uno</string> <!-- Weather - Update frequency --> + <string name="weather_refresh_manual">Manual</string> + <string name="weather_refresh_30min">30 minutos</string> + <string name="weather_refresh_60min">60 minutos</string> + <string name="weather_refresh_2hrs">2 horas</string> + <string name="weather_refresh_4hrs">4 horas</string> + <string name="weather_refresh_6hrs">6 horas</string> + <string name="weather_refresh_8hrs">8 horas</string> <!-- Preferences - Categories --> + <string name="clock_category">Reloj y alarma</string> + <string name="weather_category">Panel del tiempo</string> + <string name="calendar_category">Evento de calendario</string> <!-- Preferences - Categories --> + <string name="general_category">General</string> + <string name="display_category">Aspecto</string> <!-- Preferences - Clock --> <string name="use_digital_clock_title">Usar reloj digital</string> <string name="use_digital_clock_summary">Seleccionar para alternar entre el reloj digital y el analógico</string> + <string name="clock_font_title">Resaltar hora</string> + <string name="clock_font_minutes_title">Resaltar minutos</string> + <string name="clock_font_date_title">Resaltar fecha y alarma</string> + <string name="show_alarm_title">Mostrar alarma siguiente</string> <string name="clock_am_pm_title">Mostrar indicador AM/PM</string> <!-- Preferences - Weather --> + <string name="weather_enabled">Habilitado</string> + <string name="weather_enable">Mostrar clima</string> <string name="weather_source_title">Fuente del clima</string> - <string name="weather_source_yahoo">Yahoo! Clima</string> + <string name="weather_use_custom_location">Usar ubicación personalizada</string> + <string name="weather_geolocated">Geolocalizado por red</string> + <string name="weather_custom_location_dialog_title">Introducir ubicación</string> + <string name="weather_custom_location_hint">Ciudad, Estado/País</string> + <string name="weather_custom_location_title">Ubicación</string> + <string name="weather_show_location_title">Mostrar ubicación</string> + <string name="weather_show_timestamp_title">Mostrar fecha y hora</string> + <string name="weather_refresh_interval">Intervalo de actualización</string> + <string name="weather_use_metric">Usar sistema métrico</string> + <string name="weather_retrieve_location_dialog_title">¡No se puede encontrar la ubicación!</string> <string name="weather_retrieve_location_dialog_message">La geolocalización por red está deshabilitada.\n\nConfigurar una ubicación personalizada o habilitar la geolocalización por red</string> + <string name="weather_retrieve_location_dialog_enable_button">Habilitar</string> + <string name="weather_invert_lowhigh">Invertir las temperaturas mínimas/máximas</string> + <string name="weather_progress_title">Verificando ubicación</string> + <string name="weather_alternate_icons_title">Usar íconos de color</string> + <string name="weather_alternate_icons_summary">Seleccionar para alternar entre los íconos de color predeterminado (Color) y los alternativos (Blanco)</string> + <string name="weather_show_when_minimized_title">Mostrar al estar minimizado</string> + <string name="weather_show_when_minimized_summary">Mostrar la información climática cuando el widget esté minimizado</string> + <string name="weather_select_location">Seleccionar ubicación</string> <!-- Preferences - Calendar --> + <string name="calendar_title">Mostrar próximo evento</string> + <string name="calendars_title">Calendario de eventos</string> + <string name="calendars_summary">Buscar eventos en estos calendarios</string> + <string name="calendars_none_found_summary">No se encontraron calendarios</string> + <string name="calendar_reminders_only_title">Solo recordatorios</string> + <string name="calendar_reminders_only_summary">Mostrar solo eventos con recordatorios</string> + <string name="calendar_hide_allday_title">Ocultar eventos de todo el día</string> + <string name="calendar_icon_title">Ícono de calendario</string> + <string name="calendar_lookahead_title">Eventos futuros</string> + <string name="calendar_show_location_title">Lugar del evento</string> + <string name="calendar_show_description_title">Descripción del evento</string> + <string name="calendar_upcoming_events_category">Próximos eventos</string> + <string name="calendar_highlight_upcoming_events_title">Resaltar eventos</string> <string name="calendar_highlight_upcoming_events_summary">Resaltar los eventos del día actual y, después de las 8 p. m., también los eventos del día siguiente</string> + <string name="calendar_highlight_upcoming_events_bold">Negrita</string> <!-- Preferences - Font colors --> + <string name="font_color">Color de fuente</string> + <string name="font_color_alarm">Color de fuente de la alarma</string> + <string name="font_color_timestamp">Color de fuente de la fecha</string> + <string name="font_color_calendar_details">Color de fuente de los detalles</string> <!-- Preferences - Background color --> + <string name="background_color">Color de fondo</string> + <string name="background_transparency">Transparencia de fondo</string> <!-- Calendar - Lookahead --> + <string name="calendar_lookahead_3hrs">3 horas</string> + <string name="calendar_lookahead_6hrs">6 horas</string> + <string name="calendar_lookahead_12hrs">12 horas</string> + <string name="calendar_lookahead_today">Hoy</string> + <string name="calendar_lookahead_1day">un día</string> + <string name="calendar_lookahead_3days">3 días</string> + <string name="calendar_lookahead_1wk">1 semana</string> + <string name="calendar_lookahead_2wks">2 semanas</string> + <string name="calendar_lookahead_4wks">4 semanas</string> <!-- Calendar - Event metadata --> + <string name="calendar_metadata_none">No mostrar</string> + <string name="calendar_metadata_first_line">Mostrar la primera línea</string> + <string name="calendar_metadata_all">Mostrar todo</string> <!-- Font colors --> + <string name="white">Blanco</string> + <string name="grey">Gris</string> + <string name="black">Negro</string> + <string name="holo_blue_light">Azul claro</string> + <string name="holo_green_light">Verde claro</string> + <string name="holo_red_light">Rojo claro</string> + <string name="holo_blue_dark">Azul oscuro</string> + <string name="holo_green_dark">Verde oscuro</string> + <string name="holo_red_dark">Rojo oscuro</string> + <string name="holo_purple">Púrpura</string> + <string name="holo_orange_light">Naranja claro</string> + <string name="holo_orange_dark">Naranja oscuro</string> + <string name="holo_blue_bright">Azul brillante</string> <!-- Weather icon sets --> + <string name="weather_icon_set_title">Conjunto de íconos</string> + <string name="weather_icons_standard">Coloreado</string> + <string name="weather_icons_monochrome">Monocromático</string> + <string name="icon_set_selection_get_more">Obtener más\u2026</string> </resources> diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 974590e..8c39eba 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Actualizando\u2026</string> <string name="weather_last_sync_just_now">Ahora</string> <string name="weather_cannot_reach_provider">No se puede acceder a %s en este momento</string> + <string name="weather_source_not_selected">No ha seleccionado ningún proveedor meteorológico</string> + <string name="weather_tap_to_select_source">Pulsa para seleccionar uno</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manual</string> <string name="weather_refresh_30min">30 minutos</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Activado</string> <string name="weather_enable">Mostrar clima</string> <string name="weather_source_title">Servicio de clima</string> - <string name="weather_source_yahoo">Yahoo! Clima</string> <string name="weather_use_custom_location">Usar ubicación personalizada</string> <string name="weather_geolocated">Geolocalización por red</string> <string name="weather_custom_location_dialog_title">Introducir ubicación</string> @@ -151,6 +152,7 @@ <string name="calendar_title">Mostrar próximo evento</string> <string name="calendars_title">Calendario de eventos</string> <string name="calendars_summary">Buscar eventos de estos calendarios</string> + <string name="calendars_none_found_summary">No se encontraron calendarios</string> <string name="calendar_reminders_only_title">Solo recordatorios</string> <string name="calendar_reminders_only_summary">Mostrar solo eventos con recordatorios</string> <string name="calendar_hide_allday_title">Ocultar eventos de todo el día</string> diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml index c3f7bfe..7d71655 100644 --- a/res/values-et-rEE/strings.xml +++ b/res/values-et-rEE/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Lubatud</string> <string name="weather_enable">Näita ilma</string> <string name="weather_source_title">Ilma allikas</string> - <string name="weather_source_yahoo">Yahoo! Ilm</string> <string name="weather_use_custom_location">Kasuta kohandatud asukohta</string> <string name="weather_geolocated">Lokeeritud kasutades võrku</string> <string name="weather_custom_location_dialog_title">Sisesta asukoht</string> diff --git a/res/values-eu-rES/strings.xml b/res/values-eu-rES/strings.xml index 31cd205..e14da81 100644 --- a/res/values-eu-rES/strings.xml +++ b/res/values-eu-rES/strings.xml @@ -29,8 +29,8 @@ <string name="weather_0">Tornadoa</string> <string name="weather_1">Ekaitz tropikala</string> <string name="weather_2">Urakana</string> - <string name="weather_3">Ekaitz larriak</string> - <string name="weather_4">Ekaitzak</string> + <string name="weather_3">Trumoi-ekaitz larriak</string> + <string name="weather_4">Trumoi-ekaitzak</string> <string name="weather_5">Ura eta elurra</string> <string name="weather_6">Ura eta elur bustia</string> <string name="weather_7">Elurra eta elur bustia</string> @@ -46,38 +46,38 @@ <string name="weather_17">Kazkabarra</string> <string name="weather_18">Elur bustia</string> <string name="weather_19">Hautsa</string> - <string name="weather_20">Lainoa</string> - <string name="weather_21">Lainoa</string> + <string name="weather_20">Lainotsua</string> + <string name="weather_21">Behe-lainoa</string> <string name="weather_22">Kea</string> - <string name="weather_23">Ekaitza</string> + <string name="weather_23">Enbata</string> <string name="weather_24">Haizetsua</string> <string name="weather_25">Hotza</string> - <string name="weather_26">Lainotsua</string> + <string name="weather_26">Hodeitsua</string> <!-- Night --> - <string name="weather_27">Lainotsua gehienbat</string> + <string name="weather_27">Hodeitsua gehienbat</string> <!-- Day --> - <string name="weather_28">Lainotsua gehienbat</string> + <string name="weather_28">Hodeitsua gehienbat</string> <!-- Night --> - <string name="weather_29">Partzialki lainotsua</string> + <string name="weather_29">Partzialki hodeitsua</string> <!-- Day --> - <string name="weather_30">Partzialki lainotsua</string> + <string name="weather_30">Partzialki hodeitsua</string> <!-- Night --> <string name="weather_31">Garbia</string> <string name="weather_32">Eguzkitsua</string> <!-- Night --> - <string name="weather_33">Argia</string> + <string name="weather_33">Ona</string> <!-- Day --> - <string name="weather_34">Argia</string> + <string name="weather_34">Ona</string> <string name="weather_35">Euria eta kazkabarra</string> <string name="weather_36">Beroa</string> - <string name="weather_37">Ekaitza isolatuak</string> - <string name="weather_38">Ekaitza tartekatuak</string> - <string name="weather_39">Ekaitza tartekatuak</string> + <string name="weather_37">Trumoi-ekaitza isolatuak</string> + <string name="weather_38">Trumoi-ekaitza tartekatuak</string> + <string name="weather_39">Trumoi-ekaitza tartekatuak</string> <string name="weather_40">Zaparradak tarteka</string> <string name="weather_41">Elurte gogorrak</string> <string name="weather_42">Elurteak tarteka</string> <string name="weather_43">Elurte gogorrak</string> - <string name="weather_44">Partzialki lainotua</string> + <string name="weather_44">Partzialki hodeitsua</string> <string name="weather_45">Ekaitzak</string> <string name="weather_46">Elurteak</string> <string name="weather_47">Ekaitza isolatuak</string> @@ -100,6 +100,8 @@ <string name="weather_refreshing">Berritzen\u2026</string> <string name="weather_last_sync_just_now">Orain</string> <string name="weather_cannot_reach_provider">Momentu honetan ezinezkoa da %s -ra sartzea</string> + <string name="weather_source_not_selected">Ez da eguraldi iturririk aukeratu</string> + <string name="weather_tap_to_select_source">Sakatu bat hautatzeko</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Eskuz</string> <string name="weather_refresh_30min">30 minutu</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Gaituta</string> <string name="weather_enable">Erakutsi eguraldia</string> <string name="weather_source_title">Eguraldiaren jatorria</string> - <string name="weather_source_yahoo">Yahoo! Eguraldia</string> <string name="weather_use_custom_location">Erabili kokaleku pertsonalizatua</string> <string name="weather_geolocated">Sare bidezko geo-kokapena</string> <string name="weather_custom_location_dialog_title">Sartu kokalekua</string> diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index 74b5cb4..4b0f6dc 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">فعال</string> <string name="weather_enable">نمایش آب و هوا</string> <string name="weather_source_title">منبع آب و هوا</string> - <string name="weather_source_yahoo">آب و هوای یاهو</string> <string name="weather_use_custom_location">استفاده از مکان دیگر</string> <string name="weather_geolocated">مکان جغرافیایی با استفاده از شبکه</string> <string name="weather_custom_location_dialog_title">وارد کردن مکان</string> diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index 3612751..b0f738e 100644 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Päivitetään</string> <string name="weather_last_sync_just_now">Juuri nyt</string> <string name="weather_cannot_reach_provider">Yhteyttä palveluun %s ei saada tällä hetkellä</string> + <string name="weather_source_not_selected">Sään lähdettä ei ole valittu</string> + <string name="weather_tap_to_select_source">Paina tästä valitaksesi</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manuaalinen</string> <string name="weather_refresh_30min">30 minuuttia</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Käytössä</string> <string name="weather_enable">Näytä sää</string> <string name="weather_source_title">Säätietojen lähde</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Käytä itse valittua sijaintia</string> <string name="weather_geolocated">Paikannettu verkon avulla</string> <string name="weather_custom_location_dialog_title">Syötä sijainti</string> diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 38dd175..5339fc6 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -49,7 +49,7 @@ <string name="weather_20">Brumeux</string> <string name="weather_21">Brume</string> <string name="weather_22">Fumeux</string> - <string name="weather_23">Tempétueux</string> + <string name="weather_23">Vents forts</string> <string name="weather_24">Venteux</string> <string name="weather_25">Froid</string> <string name="weather_26">Nuageux</string> @@ -100,6 +100,8 @@ <string name="weather_refreshing">Actualisation</string> <string name="weather_last_sync_just_now">À l\'instant</string> <string name="weather_cannot_reach_provider">Impossible d\'accéder à %s pour le moment</string> + <string name="weather_source_not_selected">Aucune source météo sélectionnée</string> + <string name="weather_tap_to_select_source">Appuyer pour en sélectionner une</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manuellement</string> <string name="weather_refresh_30min">30 minutes</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Activée</string> <string name="weather_enable">Afficher la météo</string> <string name="weather_source_title">Source météo</string> - <string name="weather_source_yahoo">Yahoo! Météo</string> <string name="weather_use_custom_location">Définir un lieu</string> <string name="weather_geolocated">Géolocalisé via le réseau</string> <string name="weather_custom_location_dialog_title">Entrez un lieu</string> @@ -151,6 +152,7 @@ <string name="calendar_title">Afficher le prochain événement</string> <string name="calendars_title">Agendas des événements</string> <string name="calendars_summary">Rechercher des événements dans ces agendas</string> + <string name="calendars_none_found_summary">Aucun agenda trouvé</string> <string name="calendar_reminders_only_title">Rappels uniquement</string> <string name="calendar_reminders_only_summary">Afficher seulement les événements avec des rappels</string> <string name="calendar_hide_allday_title">Masquer les événements qui durent toute une journée</string> diff --git a/res/values-frp-rIT/strings.xml b/res/values-frp-rIT/strings.xml new file mode 100644 index 0000000..bcbe820 --- /dev/null +++ b/res/values-frp-rIT/strings.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2012-2014 The CyanogenMod Project (DvTonder) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- General strings --> + <!-- Formating strings for widget clock --> + <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and + android.text.format.DateFormat uses k for hours in the 0-23 range. + We need to support both --> + <!-- Weather - Weather codes --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Night --> + <!-- Day --> + <!-- Forecast unavailable --> + <!-- Weather - Speed units --> + <!-- Weather - Wind directions --> + <!-- Weather - Error messages --> + <!-- Weather - Update frequency --> + <!-- Preferences - Categories --> + <!-- Preferences - Categories --> + <!-- Preferences - Clock --> + <!-- Preferences - Weather --> + <!-- Preferences - Calendar --> + <!-- Preferences - Font colors --> + <!-- Preferences - Background color --> + <!-- Calendar - Lookahead --> + <!-- Calendar - Event metadata --> + <!-- Font colors --> + <!-- Weather icon sets --> +</resources> diff --git a/res/values-ga-rIE/strings.xml b/res/values-ga-rIE/strings.xml new file mode 100644 index 0000000..bcbe820 --- /dev/null +++ b/res/values-ga-rIE/strings.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.com--> +<!-- + Copyright (C) 2012-2014 The CyanogenMod Project (DvTonder) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- General strings --> + <!-- Formating strings for widget clock --> + <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and + android.text.format.DateFormat uses k for hours in the 0-23 range. + We need to support both --> + <!-- Weather - Weather codes --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Day --> + <!-- Night --> + <!-- Night --> + <!-- Day --> + <!-- Forecast unavailable --> + <!-- Weather - Speed units --> + <!-- Weather - Wind directions --> + <!-- Weather - Error messages --> + <!-- Weather - Update frequency --> + <!-- Preferences - Categories --> + <!-- Preferences - Categories --> + <!-- Preferences - Clock --> + <!-- Preferences - Weather --> + <!-- Preferences - Calendar --> + <!-- Preferences - Font colors --> + <!-- Preferences - Background color --> + <!-- Calendar - Lookahead --> + <!-- Calendar - Event metadata --> + <!-- Font colors --> + <!-- Weather icon sets --> +</resources> diff --git a/res/values-gl-rES/strings.xml b/res/values-gl-rES/strings.xml index 13700e0..2b22705 100644 --- a/res/values-gl-rES/strings.xml +++ b/res/values-gl-rES/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Actualizando</string> <string name="weather_last_sync_just_now">Agora</string> <string name="weather_cannot_reach_provider">Non se pode acceder a %s neste intre</string> + <string name="weather_source_not_selected">Non se seleccionou un fornecedor metereolóxico</string> + <string name="weather_tap_to_select_source">Toca para seleccionar un</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manual</string> <string name="weather_refresh_30min">30 minutos</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Activado</string> <string name="weather_enable">Amosar o tempo</string> <string name="weather_source_title">Fonte do tempo</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Utilizar localización personalizada</string> <string name="weather_geolocated">Xeolocalizar empregando a rede</string> <string name="weather_custom_location_dialog_title">Inserir localización</string> @@ -151,6 +152,7 @@ <string name="calendar_title">Amosar a vindeira cita</string> <string name="calendars_title">Calendarios de citas</string> <string name="calendars_summary">Atopar citas destes calendarios</string> + <string name="calendars_none_found_summary">Non encontraronse calendarios</string> <string name="calendar_reminders_only_title">Só recordatorios</string> <string name="calendar_reminders_only_summary">Amosar só citas con recordatorios</string> <string name="calendar_hide_allday_title">Agochar as citas de días completos</string> diff --git a/res/values-gu-rIN/strings.xml b/res/values-gu-rIN/strings.xml index bcbe820..e3a34e0 100644 --- a/res/values-gu-rIN/strings.xml +++ b/res/values-gu-rIN/strings.xml @@ -17,32 +17,190 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> + <string name="unknown">અજાણ્યો</string> + <string name="cancel">રદ કરો</string> + <string name="loading_indicator">વિજેટ લોડ થાય છે\u2026</string> + <string name="menu_done">થઈ ગયું</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> + <string name="weather_0">ટોર્નાડો</string> + <string name="weather_1">ટ્રૉપિકલ સ્ટૉર્મ</string> + <string name="weather_2">હરિકેન</string> + <string name="weather_3">તીવ્ર ગાજવીજ સહ: તોફાનો</string> + <string name="weather_4">ગાજવીજ સહ: તોફાનો</string> + <string name="weather_5">મિશ્રિત વરસાદ અને બરફ</string> + <string name="weather_6">મિશ્રિત વરસાદ અને હિમવર્ષા</string> + <string name="weather_7">મિશ્રિત બરફ અને હિમવર્ષા</string> + <string name="weather_8">થીજવતા છાંટા</string> + <string name="weather_9">ઝરમર વરસાદ</string> + <string name="weather_10">થીજવતો વરસાદ</string> + <string name="weather_11">પાણીની વૃષ્ટિ</string> + <string name="weather_12">પાણીની વૃષ્ટિ</string> + <string name="weather_13">હિમ વર્ષા</string> + <string name="weather_14">હળવી હિમ વર્ષા</string> + <string name="weather_15">ભારે હિમ વર્ષા</string> + <string name="weather_16">સ્નો</string> + <string name="weather_17">સુસવાટા ભેર વર્ષા</string> + <string name="weather_18">હિમવર્ષા</string> + <string name="weather_19">ધૂળ</string> + <string name="weather_20">ધુમ્મસિયુ</string> + <string name="weather_21">ધુમ્મ્સ</string> + <string name="weather_22">ધુમાડીયું</string> + <string name="weather_23">પવન ફૂંકાવો</string> + <string name="weather_24">પવનના સુસવાટા</string> + <string name="weather_25">શરદી</string> + <string name="weather_26">વાદળીયું</string> <!-- Night --> + <string name="weather_27">ઘણું કરીને વાદળિયું</string> <!-- Day --> + <string name="weather_28">ઘણું કરીને વાદળિયું</string> <!-- Night --> + <string name="weather_29">આંશિક વાદળિયું</string> <!-- Day --> + <string name="weather_30">આંશિક વાદળિયું</string> <!-- Night --> + <string name="weather_31">સાફ કરો</string> + <string name="weather_32">તડકો</string> <!-- Night --> + <string name="weather_33">વાજબી</string> <!-- Day --> + <string name="weather_34">વાજબી</string> + <string name="weather_35">મિશ્રિત વરસાદ અને હિમવર્ષા</string> + <string name="weather_36">ગરમી</string> + <string name="weather_37">છૂટા ગાજવીજ સાથેના તોફાનો</string> + <string name="weather_38">થોડાં ગાજવીજ સાથેના તોફાનો</string> + <string name="weather_39">થોડાં ગાજવીજ સાથેના તોફાનો</string> + <string name="weather_40">છૂટી છવાઇ વર્ષા</string> + <string name="weather_41">ભારે બરફ</string> + <string name="weather_42">છૂટી છવાઇ હિમ વર્ષા</string> + <string name="weather_43">ભારે બરફ</string> + <string name="weather_44">આંશિક વાદળિયું</string> + <string name="weather_45">ગાજવીજનાં તોફાન</string> + <string name="weather_46">હિમ વર્ષા</string> + <string name="weather_47">છૂટા ગાજવીજ સાથેના તોફાનો</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> + <string name="weather_kph">kph</string> + <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> + <string name="weather_N">ઉ</string> + <string name="weather_NE">ઉ.પૂ</string> + <string name="weather_E">પૂ</string> + <string name="weather_SE">દ.પૂ</string> + <string name="weather_S">દ</string> + <string name="weather_SW">દ.પ</string> + <string name="weather_W">પ</string> + <string name="weather_NW">ઉ.પ</string> <!-- Weather - Error messages --> + <string name="weather_no_data">કોઇ ડેટા નથી</string> + <string name="weather_tap_to_refresh">રિફ્રેશ કરવા ટૅપ કરો</string> + <string name="weather_refreshing">રીફ્રેશ થઈ રહ્યુ છે</string> + <string name="weather_last_sync_just_now">હમણાં જ</string> + <string name="weather_cannot_reach_provider">આ પળે %s સુધી પહોંચી શકાતું નથી</string> <!-- Weather - Update frequency --> + <string name="weather_refresh_manual">મેન્યુલ</string> + <string name="weather_refresh_30min">30 મિનીટ્સ</string> + <string name="weather_refresh_60min">60 મિનીટ્સ</string> + <string name="weather_refresh_2hrs">2 કલાક</string> + <string name="weather_refresh_4hrs">4 કલાક</string> + <string name="weather_refresh_6hrs">6 કલાક</string> + <string name="weather_refresh_8hrs">8 કલાક</string> <!-- Preferences - Categories --> + <string name="clock_category">ક્લૉક અને ઍલાર્મ</string> + <string name="weather_category">હવામાન પૅનલ</string> + <string name="calendar_category">કૅલેન્ડર ઇવેન્ટ્સ</string> <!-- Preferences - Categories --> + <string name="general_category">સામાન્ય</string> + <string name="display_category">પ્રદર્શન</string> <!-- Preferences - Clock --> + <string name="use_digital_clock_title">ડિજિટલ ક્લૉકનો વપરાશ કરો</string> + <string name="use_digital_clock_summary">ડિજિટલ અને ઍનાલોગ ક્લૉક વચ્ચે ટૉગલ કરવા પસંદ કરો</string> + <string name="clock_font_title">બોલ્ડ કલાકો</string> + <string name="clock_font_minutes_title">બોલ્ડ મિનિટો</string> + <string name="clock_font_date_title">બોલ્ડ તારીખ અને ઍલાર્મ</string> + <string name="show_alarm_title">આગામી ઍલાર્મ દર્શાવો</string> + <string name="clock_am_pm_title">AM/PM સૂચક દર્શાવો</string> <!-- Preferences - Weather --> + <string name="weather_enabled">સક્ષમ કરેલ</string> + <string name="weather_enable">હવામાન દર્શાવો</string> + <string name="weather_source_title">હવામાન સ્ત્રોત</string> + <string name="weather_use_custom_location">કસ્ટમ સ્થાન વાપરો</string> + <string name="weather_geolocated">નેટવર્કનો ઉપયોગ કરીને જીઓલોકેટ કર્યું</string> + <string name="weather_custom_location_dialog_title">લોકેશન દાખલ કરો</string> + <string name="weather_custom_location_hint">શહેર, રાજ્ય/દેશ</string> + <string name="weather_custom_location_title">સ્થાન</string> + <string name="weather_show_location_title">લોકેશન દર્શાવો</string> + <string name="weather_show_timestamp_title">ટાઇમસ્ટેમ્પ દર્શાવો</string> + <string name="weather_refresh_interval">અંતરાલ અપડેટ કરો</string> + <string name="weather_use_metric">મેટ્રિક વાપરો</string> + <string name="weather_retrieve_location_dialog_title">લોકેશન પુન:પ્રાપ્ત થઈ શક્યું નહીં!</string> + <string name="weather_retrieve_location_dialog_message">નેટવર્ક જીઓલોકેશન અક્ષમ કરાયું છે.\n\nકસ્ટમ લોકેશન સેટ કરો અથવા નેટવર્ક લોકેશન સક્ષમ કરો</string> + <string name="weather_retrieve_location_dialog_enable_button">સક્ષમ કરો</string> + <string name="weather_invert_lowhigh">નિમ્ન/ઉચ્ચ તાપમાનો ઊલટાવો</string> + <string name="weather_progress_title">લોકેશનની ખરાઇ થાય છે</string> + <string name="weather_alternate_icons_title">કલર આઇકૉન્સ વાપરો</string> + <string name="weather_alternate_icons_summary">ડિફૉલ્ટ (રંગ) અને વૈકલ્પિક (સફેદ) આઇકૉન્સ વચ્ચે ટૉગલ કરવાનું પસંદ કરો</string> + <string name="weather_show_when_minimized_title">મિનિમાઇઝ થાય ત્યારે દર્શાવો</string> + <string name="weather_show_when_minimized_summary">વિજેટ મિનિમાઇઝ કરવામાં આવે ત્યારે હવામાન માહિતીનો સારાંશ દર્શાવો</string> + <string name="weather_select_location">સ્થાન પસંદ કરો</string> <!-- Preferences - Calendar --> + <string name="calendar_title">આગામી ઇવેન્ટ દર્શાવો</string> + <string name="calendars_title">ઇવેન્ટ કૅલેન્ડરો</string> + <string name="calendars_summary">આ કૅલેન્ડરોમાંથી ઇવેન્ટ્સ શોધો</string> + <string name="calendars_none_found_summary">કોઈ કૅલેન્ડર્સ મળ્યું નથી</string> + <string name="calendar_reminders_only_title">ફકત રિમાઇન્ડરો</string> + <string name="calendar_reminders_only_summary">ફકત રિમાઇન્ડરો સાથેની ઇવેન્ટ્સ દર્શાવો</string> + <string name="calendar_hide_allday_title">તમામ-દિવસની ઇવેન્ટ્સ છૂપાવો</string> + <string name="calendar_icon_title">કૅલેન્ડર આઇકૉન</string> + <string name="calendar_lookahead_title">ઇવેન્ટ લુકઅહેડ</string> + <string name="calendar_show_location_title">ઇવેન્ટ લોકેશન</string> + <string name="calendar_show_description_title">ઇવેન્ટ વિવરણ</string> + <string name="calendar_upcoming_events_category">આવનારા ઇવેન્ટ્સ</string> + <string name="calendar_highlight_upcoming_events_title">હાઇલાઇટ ઇવેન્ટ્સ</string> + <string name="calendar_highlight_upcoming_events_summary">આજના દિવસની ઇવેન્ટ્સ અને 8pm પછીની, ઉપરાંત આગામી દિવસની ઇવેન્ટ્સ પણ હાઇલાઇટ કરો</string> + <string name="calendar_highlight_upcoming_events_bold">બોલ્ડ ફોન્ટ</string> <!-- Preferences - Font colors --> + <string name="font_color">ફોન્ટ કલર</string> + <string name="font_color_alarm">ઍલાર્મ ફોન્ટ કલર</string> + <string name="font_color_timestamp">ટાઇમસ્ટેમ્પ ફોન્ટ કલર</string> + <string name="font_color_calendar_details">ફોન્ટ કલર વિગતો</string> <!-- Preferences - Background color --> + <string name="background_color">પૃષ્ઠભૂમિ રંગ</string> + <string name="background_transparency">પૃષ્ઠભૂમિ પારદર્શકતા</string> <!-- Calendar - Lookahead --> + <string name="calendar_lookahead_3hrs">3 કલાક</string> + <string name="calendar_lookahead_6hrs">6 કલાક</string> + <string name="calendar_lookahead_12hrs">12 કલાક</string> + <string name="calendar_lookahead_today">આજે</string> + <string name="calendar_lookahead_1day">1 દિવસ</string> + <string name="calendar_lookahead_3days">3 દિવસ</string> + <string name="calendar_lookahead_1wk">1 સપ્તાહ</string> + <string name="calendar_lookahead_2wks">2 અઠવાડિયા</string> + <string name="calendar_lookahead_4wks">4 અઠવાડિયા</string> <!-- Calendar - Event metadata --> + <string name="calendar_metadata_none">દર્શાવશો નહીં</string> + <string name="calendar_metadata_first_line">પ્રથમ લાઇન દર્શાવો</string> + <string name="calendar_metadata_all">બધા જ બતાવો</string> <!-- Font colors --> + <string name="white">સફેદ</string> + <string name="grey">ગ્રે</string> + <string name="black">કાળો</string> + <string name="holo_blue_light">લાઇટ બ્લૂ</string> + <string name="holo_green_light">લાઇટ ગ્રીન</string> + <string name="holo_red_light">લાઇટ રેડ</string> + <string name="holo_blue_dark">ડાર્ક બ્લૂ</string> + <string name="holo_green_dark">ડાર્ક ગ્રીન</string> + <string name="holo_red_dark">ડાર્ક રેડ</string> + <string name="holo_purple">જાંબલી</string> + <string name="holo_orange_light">લાઇટ ઑરેન્જ</string> + <string name="holo_orange_dark">ડાર્ક ઑરેન્જ</string> + <string name="holo_blue_bright">બ્રાઇટ બ્લૂ</string> <!-- Weather icon sets --> + <string name="weather_icon_set_title">આઇકૉન સેટ</string> + <string name="weather_icons_standard">કલર્ડ</string> + <string name="weather_icons_monochrome">મોનોક્રોમ</string> + <string name="icon_set_selection_get_more">વધુ મેળવો\u2026</string> </resources> diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml index 33304b8..cb0329a 100644 --- a/res/values-hi/strings.xml +++ b/res/values-hi/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">सक्षम</string> <string name="weather_enable">मौसम दिखाएँ</string> <string name="weather_source_title">मौसम का स्रोत</string> - <string name="weather_source_yahoo">याहू! मौसम</string> <string name="weather_use_custom_location">मनपसंद स्थान उपयोग करें</string> <string name="weather_geolocated">नेटवर्क का उपयोग करके जियोलोकेट किया गया</string> <string name="weather_custom_location_dialog_title">स्थान दर्ज करें</string> diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml index 62a63f7..6f3d4ba 100644 --- a/res/values-hr/strings.xml +++ b/res/values-hr/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Osvježavanje</string> <string name="weather_last_sync_just_now">Sada</string> <string name="weather_cannot_reach_provider">Ne mogu doći do %s u ovom trenutku</string> + <string name="weather_source_not_selected">Nema odabranog izvora vremenske prognoze</string> + <string name="weather_tap_to_select_source">Dodirnite za odabir jednog</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Ručno</string> <string name="weather_refresh_30min">30 minuta</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Omogućeno</string> <string name="weather_enable">Prikaži vrijeme</string> <string name="weather_source_title">Izvor vremena</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Koristi prilagođenu lokaciju</string> <string name="weather_geolocated">Geolocirano pomoću mreže</string> <string name="weather_custom_location_dialog_title">Unesite lokaciju</string> diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index d0f4f53..3ed9742 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Frissítés\u2026</string> <string name="weather_last_sync_just_now">Épp most</string> <string name="weather_cannot_reach_provider">%s nem elérhető</string> + <string name="weather_source_not_selected">Nincs kiválasztva időjárás forrás</string> + <string name="weather_tap_to_select_source">Érintéssel válasszon egyet</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Kézi</string> <string name="weather_refresh_30min">30 perc</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Engedélyezve</string> <string name="weather_enable">Időjárás megjelenítése</string> <string name="weather_source_title">Időjárás forrása</string> - <string name="weather_source_yahoo">Yahoo! Időjárás</string> <string name="weather_use_custom_location">Egyéni hely használata</string> <string name="weather_geolocated">Helyzetmeghatározás</string> <string name="weather_custom_location_dialog_title">Hely megadása</string> diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index 057b537..e21608b 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -29,7 +29,7 @@ <string name="weather_0">Topan</string> <string name="weather_1">Badai Tropis</string> <string name="weather_2">Badai</string> - <string name="weather_3">Petir Parah</string> + <string name="weather_3">Badai Petir Besar</string> <string name="weather_4">Badai Petir</string> <string name="weather_5">Campuran Hujan dan Salju</string> <string name="weather_6">Campuran Hujan dan Hujan Es</string> @@ -40,7 +40,7 @@ <string name="weather_11">Hujan ringan</string> <string name="weather_12">Hujan ringan</string> <string name="weather_13">Bersalju</string> - <string name="weather_14">Hujan Salju Rendah</string> + <string name="weather_14">Hujan Salju Ringan</string> <string name="weather_15">Hembusan Salju</string> <string name="weather_16">Salju</string> <string name="weather_17">Hujan es</string> @@ -70,7 +70,7 @@ <string name="weather_34">Baik</string> <string name="weather_35">Campuran hujan dan hujan es</string> <string name="weather_36">Panas</string> - <string name="weather_37">Terisolasi petir</string> + <string name="weather_37">Badai petir terisolasi</string> <string name="weather_38">Badai Petir tersebar</string> <string name="weather_39">Badai Petir tersebar</string> <string name="weather_40">Hujan Gerimis</string> @@ -78,9 +78,9 @@ <string name="weather_42">Hujan Gerimis</string> <string name="weather_43">Hujan salju</string> <string name="weather_44">Sebagian Berawan</string> - <string name="weather_45">Petir disertai gerimis</string> + <string name="weather_45">Petir disertai hujan</string> <string name="weather_46">Salju ringan</string> - <string name="weather_47">Terisolasi Thundershowers</string> + <string name="weather_47">Hujan gerimis dengan badai petir yang terisolasi</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> <string name="weather_kph">km/j</string> @@ -96,10 +96,12 @@ <string name="weather_NW">BL</string> <!-- Weather - Error messages --> <string name="weather_no_data">Tidak ada data</string> - <string name="weather_tap_to_refresh">Tap untuk merefresh</string> - <string name="weather_refreshing">Refreshing</string> + <string name="weather_tap_to_refresh">Ketuk untuk menyegarkan</string> + <string name="weather_refreshing">Menyegarkan</string> <string name="weather_last_sync_just_now">Baru saja</string> <string name="weather_cannot_reach_provider">Tidak dapat mencapai %s pada saat ini</string> + <string name="weather_source_not_selected">Tidak ada sumber cuaca yang dipilih</string> + <string name="weather_tap_to_select_source">Ketuk untuk memilih salah satu</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manual</string> <string name="weather_refresh_30min">30 menit</string> @@ -117,7 +119,7 @@ <string name="display_category">Tampilan</string> <!-- Preferences - Clock --> <string name="use_digital_clock_title">Gunakan jam Digital</string> - <string name="use_digital_clock_summary">Pilih untuk beralih di antara Digital dan jam Analog</string> + <string name="use_digital_clock_summary">Pilih untuk beralih di antara jam digital dan analog</string> <string name="clock_font_title">Tebal jam</string> <string name="clock_font_minutes_title">Tebal menit</string> <string name="clock_font_date_title">Tebal tanggal dan alarm</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Diaktifkan</string> <string name="weather_enable">Tampilkan cuaca</string> <string name="weather_source_title">Sumber cuaca</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Gunakan lokasi kustom</string> <string name="weather_geolocated">Geo-lokasi menggunakan jaringan</string> <string name="weather_custom_location_dialog_title">Masukkan lokasi</string> @@ -138,21 +139,22 @@ <string name="weather_refresh_interval">Interval pembaruan</string> <string name="weather_use_metric">Gunakan metrik</string> <string name="weather_retrieve_location_dialog_title">Tidak dapat mengambil lokasi!</string> - <string name="weather_retrieve_location_dialog_message">Jaringan geo-lokasi nonaktif.\n\nTentukan lokasi kustom atau aktifkan lokasi jaringan</string> + <string name="weather_retrieve_location_dialog_message">Jaringan geo-lokasi dinon-aktifkan.\n\nTentukan lokasi yang tersuai atau aktifkan lokasi jaringan</string> <string name="weather_retrieve_location_dialog_enable_button">Aktifkan</string> <string name="weather_invert_lowhigh">Balikkan suhu rendah/tinggi</string> <string name="weather_progress_title">Verifikasi lokasi</string> <string name="weather_alternate_icons_title">Gunakan ikon warna</string> - <string name="weather_alternate_icons_summary">Pilih untuk beralih antara ikon baku (warna) atau alternatif (putih)</string> - <string name="weather_show_when_minimized_title">Tampilkan ketika diminimalkan</string> - <string name="weather_show_when_minimized_summary">Tampilkan ringkasan informasi cuaca ketika widget diminimalkan</string> + <string name="weather_alternate_icons_summary">Pilih untuk beralih di antara ikon bawaan (berwarna) atau ikon alternatif (putih)</string> + <string name="weather_show_when_minimized_title">Tampilkan ketika dikecilkan</string> + <string name="weather_show_when_minimized_summary">Tampilkan ringkasan informasi cuaca ketika widget diperkecil</string> <string name="weather_select_location">Pilih lokasi</string> <!-- Preferences - Calendar --> <string name="calendar_title">Tampilkan acara berikutnya</string> <string name="calendars_title">Kalender acara</string> <string name="calendars_summary">Temukan acara dari kalender tersebut</string> + <string name="calendars_none_found_summary">Tidak ada kalendar yang ditemukan</string> <string name="calendar_reminders_only_title">Pengingat saja</string> - <string name="calendar_reminders_only_summary">Tampilkan hanya acara dengan pengingat</string> + <string name="calendar_reminders_only_summary">Tampilkan acara dengan pengingat saja</string> <string name="calendar_hide_allday_title">Sembunyikan acara sepanjang hari</string> <string name="calendar_icon_title">Ikon kalender</string> <string name="calendar_lookahead_title">Acara lookahead</string> @@ -166,8 +168,10 @@ <string name="font_color">Warna huruf</string> <string name="font_color_alarm">Warna huruf alarm</string> <string name="font_color_timestamp">Warna huruf jam</string> - <string name="font_color_calendar_details">Warna huruf rincian</string> + <string name="font_color_calendar_details">Warna huruf detail</string> <!-- Preferences - Background color --> + <string name="background_color">Warna latar belakang</string> + <string name="background_transparency">Transparansi latar belakang</string> <!-- Calendar - Lookahead --> <string name="calendar_lookahead_3hrs">3 jam</string> <string name="calendar_lookahead_6hrs">6 jam</string> diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 01d2ec6..0c02f63 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Aggiornamento\u2026</string> <string name="weather_last_sync_just_now">Poco fa</string> <string name="weather_cannot_reach_provider">Impossibile collegarsi a %s al momento</string> + <string name="weather_source_not_selected">Nessuna fonte meteo selezionata</string> + <string name="weather_tap_to_select_source">Tocca per impostare</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manuale</string> <string name="weather_refresh_30min">30 minuti</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Attivo</string> <string name="weather_enable">Visualizza meteo</string> <string name="weather_source_title">Fonte meteo</string> - <string name="weather_source_yahoo">Yahoo! Meteo</string> <string name="weather_use_custom_location">Posizione personalizzata</string> <string name="weather_geolocated">Localizzazione tramite la rete</string> <string name="weather_custom_location_dialog_title">Inserisci la posizione</string> diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index a893bc6..76a65c1 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -20,7 +20,7 @@ <string name="unknown">לא ידוע</string> <string name="cancel">בטל</string> <string name="loading_indicator">טוען ווידג\'ט\u2026</string> - <string name="menu_done">סיום</string> + <string name="menu_done">בוצע</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. @@ -31,9 +31,9 @@ <string name="weather_2">הוריקן</string> <string name="weather_3">סופות רעמים קשות</string> <string name="weather_4">סופות רעמים</string> - <string name="weather_5">גשם מעורב עם שלג</string> - <string name="weather_6">גשם מעורב עם שלג קל</string> - <string name="weather_7">שלג מעורב עם גשם קל</string> + <string name="weather_5">גשם מעורב בשלג</string> + <string name="weather_6">גשם מעורב בשלג קל</string> + <string name="weather_7">שלג מעורב בגשם קל</string> <string name="weather_8">טפטוף קפוא</string> <string name="weather_9">טפטוף</string> <string name="weather_10">גשם קפוא</string> @@ -63,14 +63,14 @@ <string name="weather_30">מעונן חלקית</string> <!-- Night --> <string name="weather_31">בהיר</string> - <string name="weather_32">שמשי</string> + <string name="weather_32">בהיר</string> <!-- Night --> - <string name="weather_33">סביר</string> + <string name="weather_33">לילה בהיר</string> <!-- Day --> - <string name="weather_34">סביר</string> - <string name="weather_35">גשם מעורב עם ברד</string> + <string name="weather_34">בהיר</string> + <string name="weather_35">גשם מעורב בברד</string> <string name="weather_36">חם</string> - <string name="weather_37">סופות רעמים מבודדת</string> + <string name="weather_37">סופות רעמים בודדות</string> <string name="weather_38">סופות רעמים פזורות</string> <string name="weather_39">סופות רעמים פזורות</string> <string name="weather_40">ממטרים פזורים</string> @@ -100,11 +100,13 @@ <string name="weather_refreshing">מרענן</string> <string name="weather_last_sync_just_now">כרגע</string> <string name="weather_cannot_reach_provider">אין אפשרות להגיע אל %s כרגע</string> + <string name="weather_source_not_selected">לא נבחר מקור לנתוני מזג אוויר</string> + <string name="weather_tap_to_select_source">גע כדי לבחור אחד</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">ידני</string> <string name="weather_refresh_30min">30 דקות</string> <string name="weather_refresh_60min">60 דקות</string> - <string name="weather_refresh_2hrs">2 שעות</string> + <string name="weather_refresh_2hrs">שעתיים</string> <string name="weather_refresh_4hrs">4 שעות</string> <string name="weather_refresh_6hrs">6 שעות</string> <string name="weather_refresh_8hrs">8 שעות</string> @@ -117,17 +119,16 @@ <string name="display_category">תצוגה</string> <!-- Preferences - Clock --> <string name="use_digital_clock_title">השתמש בשעון דיגיטלי</string> - <string name="use_digital_clock_summary">בחר באפשרות זו כדי לעבור בין שעון דיגיטלי לבין שעון אנלוגי</string> + <string name="use_digital_clock_summary">בחר באפשרות זו כדי לעבור בין שעון דיגיטלי לשעון אנלוגי</string> <string name="clock_font_title">שעות מודגשות</string> <string name="clock_font_minutes_title">דקות מודגשות</string> <string name="clock_font_date_title">שעון מעורר ותאריך מודגשים</string> <string name="show_alarm_title">הצג שעון מעורר הבא</string> <string name="clock_am_pm_title">הצג מחוון AM/PM</string> <!-- Preferences - Weather --> - <string name="weather_enabled">מאופשר</string> + <string name="weather_enabled">מופעל</string> <string name="weather_enable">הצג מזג אוויר</string> <string name="weather_source_title">מקור למזג אוויר</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">השתמש במיקום מותאם אישית</string> <string name="weather_geolocated">מיקום לפי רשת</string> <string name="weather_custom_location_dialog_title">הזן מיקום</string> @@ -138,14 +139,14 @@ <string name="weather_refresh_interval">עדכן מרווח זמן</string> <string name="weather_use_metric">השתמש בשיטה מטרית</string> <string name="weather_retrieve_location_dialog_title">אין אפשרות לקבל מיקום!</string> - <string name="weather_retrieve_location_dialog_message">מיקום רשת מושבת.\n\nבחר מיקום ידני או שתפעיל מיקום רשת</string> + <string name="weather_retrieve_location_dialog_message">מיקום רשת מושבת.\n\nבחר מיקום ידני או הפעל מיקום רשת</string> <string name="weather_retrieve_location_dialog_enable_button">הפעל</string> <string name="weather_invert_lowhigh">היפוך בטמפרטורה נמוכה/גבוהה</string> <string name="weather_progress_title">בדיקת מיקום</string> - <string name="weather_alternate_icons_title">השתמש בצבע סמלים</string> - <string name="weather_alternate_icons_summary">בחר כדי להעביר בין סמלים ברירת מחדל (צבעים) ואלטרנטיבה (לבנים)</string> + <string name="weather_alternate_icons_title">השתמש בסמלי צבע</string> + <string name="weather_alternate_icons_summary">בחר כדי להעביר בין סמלי ברירת מחדל (בצבעים) וסמלים אלטרנטיביים (לבנים)</string> <string name="weather_show_when_minimized_title">הצג כאשר ממוזער</string> - <string name="weather_show_when_minimized_summary">הצג נתוני סיכום תחזית כאשר יישומון ממוזער</string> + <string name="weather_show_when_minimized_summary">הצג נתוני סיכום תחזית כאשר היישומון ממוזער</string> <string name="weather_select_location">בחר מיקום</string> <!-- Preferences - Calendar --> <string name="calendar_title">הצגת האירוע הבא</string> @@ -179,12 +180,12 @@ <string name="calendar_lookahead_1day">יום אחד</string> <string name="calendar_lookahead_3days">3 ימים</string> <string name="calendar_lookahead_1wk">שבוע אחד</string> - <string name="calendar_lookahead_2wks">2 שבועות</string> + <string name="calendar_lookahead_2wks">שבועיים</string> <string name="calendar_lookahead_4wks">4 שבועות</string> <!-- Calendar - Event metadata --> <string name="calendar_metadata_none">אל תראה</string> <string name="calendar_metadata_first_line">הצג שורה ראשונה</string> - <string name="calendar_metadata_all">הצג הכל</string> + <string name="calendar_metadata_all">הצג הכול</string> <!-- Font colors --> <string name="white">לבן</string> <string name="grey">אפור</string> diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 1bb637d..530447c 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">更新中</string> <string name="weather_last_sync_just_now">たった今</string> <string name="weather_cannot_reach_provider">現在%sに接続できません</string> + <string name="weather_source_not_selected">天気の情報提供元が選択されていません</string> + <string name="weather_tap_to_select_source">タップして選択する</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">手動</string> <string name="weather_refresh_30min">30分</string> @@ -126,8 +128,7 @@ <!-- Preferences - Weather --> <string name="weather_enabled">有効</string> <string name="weather_enable">天気を表示</string> - <string name="weather_source_title">天気のソース</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> + <string name="weather_source_title">天気の情報提供元</string> <string name="weather_use_custom_location">カスタムの場所を使用</string> <string name="weather_geolocated">ネットワークを使用して現在地を取得する</string> <string name="weather_custom_location_dialog_title">場所を入力</string> diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn-rIN/strings.xml index 7a3c2f1..c3d13ed 100644 --- a/res/values-kn-rIN/strings.xml +++ b/res/values-kn-rIN/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">ಸಕ್ರಿಯಗೊಂಡಿದೆ</string> <string name="weather_enable">ಹವಾಮಾನ ಪ್ರದರ್ಶಿಸು</string> <string name="weather_source_title">ಹವಾಮಾನ ಮೂಲ</string> - <string name="weather_source_yahoo">ಯಾಹೂ! ಹವಾಮಾನ</string> <string name="weather_use_custom_location">ಕಸ್ಟಂ ಸ್ಥಳವನ್ನು ಉಪಯೋಗಿಸಿ</string> <string name="weather_geolocated">ನೆಟ್ವರ್ಕ್ ಉಪಯೋಗಿಸಿ ಜಿಯೋಲೊಕೇಟ್ ಮಾಡಿದೆ</string> <string name="weather_custom_location_dialog_title">ಸ್ಥಳವನ್ನು ಹಾಕಿ</string> @@ -151,6 +150,7 @@ <string name="calendar_title">ಮುಂದಿನ ಘಟನೆಯನ್ನು ಪ್ರದರ್ಶಿಸು</string> <string name="calendars_title">ಘಟನೆ ಕ್ಯಾಲೆಂಡರ್ಗಳು</string> <string name="calendars_summary">ಈ ಕ್ಯಾಲೆಂಡರ್ಗಳಿಂದ ಘಟನೆಗಳನ್ನು ಹುಡುಕು</string> + <string name="calendars_none_found_summary">ಯಾವುದೇ ಕ್ಯಾಲೆಂಡರ್ಗಳಿಲ್ಲ</string> <string name="calendar_reminders_only_title">ಜ್ಞಾಪನೆಗಳು ಮಾತ್ರ</string> <string name="calendar_reminders_only_summary">ಜ್ಞಾಪನೆಗಳುಳ್ಳ ಘಟನೆಗಳನ್ನು ಮಾತ್ರ ಪ್ರದರ್ಶಿಸು</string> <string name="calendar_hide_allday_title">ಪೂರ್ತಿ-ದಿನ ಘಟನೆಗಳನ್ನು ಮರೆಮಾಡು</string> diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 79f5935..7c26d24 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">새로 고침 중</string> <string name="weather_last_sync_just_now">방금 전</string> <string name="weather_cannot_reach_provider">%s에 접속할 수 없음</string> + <string name="weather_source_not_selected">날씨 제공자 선택하지 않음</string> + <string name="weather_tap_to_select_source">탭하여 선택하기</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">수동</string> <string name="weather_refresh_30min">30분</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">활성화</string> <string name="weather_enable">날씨 표시</string> <string name="weather_source_title">날씨 제공자</string> - <string name="weather_source_yahoo">Yahoo! 날씨</string> <string name="weather_use_custom_location">직접 위치 지정</string> <string name="weather_geolocated">네트워크에서 위치 얻기</string> <string name="weather_custom_location_dialog_title">위치 입력</string> diff --git a/res/values-ku/strings.xml b/res/values-ku/strings.xml index 07fe70a..a13e3fd 100644 --- a/res/values-ku/strings.xml +++ b/res/values-ku/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">چالاکە</string> <string name="weather_enable">پیشاندانی کەش و هەو</string> <string name="weather_source_title">سەرچاوەی کەش و هەوا</string> - <string name="weather_source_yahoo">کەش و هەوای یاهۆ!</string> <string name="weather_use_custom_location">بەکارهێنانی شوێنی تایبەت</string> <string name="weather_geolocated">شوێن دیاریکهر به بهکارهێنانی هێڵ</string> <string name="weather_custom_location_dialog_title">شوێن بنوسە</string> diff --git a/res/values-lb/strings.xml b/res/values-lb/strings.xml index 6666892..2c361c9 100644 --- a/res/values-lb/strings.xml +++ b/res/values-lb/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Aktivéiert</string> <string name="weather_enable">Wieder uweisen</string> <string name="weather_source_title">Meteoservice</string> - <string name="weather_source_yahoo">Yahoo! Wieder</string> <string name="weather_use_custom_location">Benotzerdefinéierte Standuert</string> <string name="weather_geolocated">Standuert iwwer d\'Netzwierk bestëmmt</string> <string name="weather_custom_location_dialog_title">Standuert aginn</string> diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml index be2ced8..a66d7a1 100644 --- a/res/values-lt/strings.xml +++ b/res/values-lt/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Įgalinta</string> <string name="weather_enable">Rodyti orus</string> <string name="weather_source_title">Orų šaltinis</string> - <string name="weather_source_yahoo">Yahoo! Orai</string> <string name="weather_use_custom_location">Naudoti tinkintą vietovę</string> <string name="weather_geolocated">Nustatyta naudojant tinklą</string> <string name="weather_custom_location_dialog_title">Įveskite vietovę</string> diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml index ce99dea..cdd634a 100644 --- a/res/values-lv/strings.xml +++ b/res/values-lv/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Ieslēgts</string> <string name="weather_enable">Rādīt laika apstākļus</string> <string name="weather_source_title">Laika apstākļu avots</string> - <string name="weather_source_yahoo">Yahoo! Laika apstākļi</string> <string name="weather_use_custom_location">Lietot pielāgotu atrašanās vietu</string> <string name="weather_geolocated">Noteikt koordinātes, izmantojot tīklu</string> <string name="weather_custom_location_dialog_title">Ievadiet atrašanās vietu</string> diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml index bcbe820..9dc1683 100644 --- a/res/values-ml-rIN/strings.xml +++ b/res/values-ml-rIN/strings.xml @@ -17,32 +17,190 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> + <string name="unknown">അജ്ഞാതം</string> + <string name="cancel">റദ്ദാക്കുക</string> + <string name="loading_indicator">വിജറ്റ് ലോഡ് ചെയ്യുന്നു\u2026</string> + <string name="menu_done">പൂർത്തിയാക്കി</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> + <string name="weather_0">ചുഴലിക്കാറ്റ്</string> + <string name="weather_1">ഉഷ്ണമേഖലാ കൊടുങ്കാറ്റ്</string> + <string name="weather_2">കൊടുങ്കാറ്റ്</string> + <string name="weather_3">ശക്തമായ ഇടിയും മിന്നലും</string> + <string name="weather_4">ഇടിമിന്നൽ</string> + <string name="weather_5">മഴയും മഞ്ഞും സമ്മിശ്രം</string> + <string name="weather_6">മഴയും ആലിപ്പഴം പെയ്യലും സമ്മിശ്രം</string> + <string name="weather_7">മഞ്ഞും ആലിപ്പഴം പെയ്യലും സമ്മിശ്രം</string> + <string name="weather_8">തണുപ്പുള്ള ചാറ്റൽമഴ</string> + <string name="weather_9">ചാറ്റൽമഴ</string> + <string name="weather_10">തണുപ്പുള്ള മഴ</string> + <string name="weather_11">മഴ</string> + <string name="weather_12">മഴ</string> + <string name="weather_13">മഞ്ഞ് കാറ്റ്</string> + <string name="weather_14">നേരിയ മഞ്ഞ് മഴ</string> + <string name="weather_15">വീശിയടിക്കുന്ന മഞ്ഞ്</string> + <string name="weather_16">മഞ്ഞ്</string> + <string name="weather_17">ആലിപ്പഴം</string> + <string name="weather_18">ആലിപ്പഴം പെയ്യല്</string> + <string name="weather_19">പൊടി</string> + <string name="weather_20">മൂടിക്കെട്ടിയ</string> + <string name="weather_21">മൂടല്മഞ്ഞ്</string> + <string name="weather_22">മങ്ങിയ</string> + <string name="weather_23">ശക്തമായ കാറ്റ്</string> + <string name="weather_24">കാറ്റുള്ള</string> + <string name="weather_25">കോൾഡ്</string> + <string name="weather_26">മേഘാവൃതം</string> <!-- Night --> + <string name="weather_27">മിക്കവാറും മേഘാവൃതം</string> <!-- Day --> + <string name="weather_28">മിക്കവാറും മേഘാവൃതം</string> <!-- Night --> + <string name="weather_29">ഭാഗികമായി മേഘാവൃതം</string> <!-- Day --> + <string name="weather_30">ഭാഗികമായി മേഘാവൃതം</string> <!-- Night --> + <string name="weather_31">മായ്ക്കുക</string> + <string name="weather_32">തെളിഞ്ഞ</string> <!-- Night --> + <string name="weather_33">പ്രസന്നമായ</string> <!-- Day --> + <string name="weather_34">പ്രസന്നമായ</string> + <string name="weather_35">മഴയും ആലിപ്പഴം പെയ്യലും സമ്മിശ്രം</string> + <string name="weather_36">ചൂടുള്ള</string> + <string name="weather_37">ഒറ്റപ്പെട്ട ഇടിയോടുകൂടിയ</string> + <string name="weather_38">ചിതറിയ കൊടുങ്കാറ്റ്</string> + <string name="weather_39">ചിതറിയ കൊടുങ്കാറ്റ്</string> + <string name="weather_40">അങ്ങിങ്ങ് മഴ</string> + <string name="weather_41">കനത്ത മഞ്ഞ്</string> + <string name="weather_42">ചിതറിയ മഞ്ഞ് മഴ</string> + <string name="weather_43">കനത്ത മഞ്ഞ്</string> + <string name="weather_44">ഭാഗികമായി മേഘാവൃതം</string> + <string name="weather_45">ഇടിയോടുകൂടിയ മഴ</string> + <string name="weather_46">മഞ്ഞ് മഴ</string> + <string name="weather_47">ഒറ്റപ്പെട്ട ഇടിയോടുകൂടിയ മഴ</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> + <string name="weather_kph">kph</string> + <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> + <string name="weather_N">N</string> + <string name="weather_NE">NE</string> + <string name="weather_E">E</string> + <string name="weather_SE">SE</string> + <string name="weather_S">S</string> + <string name="weather_SW">SW</string> + <string name="weather_W">W</string> + <string name="weather_NW">NW</string> <!-- Weather - Error messages --> + <string name="weather_no_data">ഡാറ്റയൊന്നുമില്ല</string> + <string name="weather_tap_to_refresh">പുതുക്കുന്നതിനായി അമര്ത്തുക</string> + <string name="weather_refreshing">പുതുക്കുന്നു</string> + <string name="weather_last_sync_just_now">ഇപ്പോൾ</string> + <string name="weather_cannot_reach_provider">ഈ നിമിഷം % ല് എത്താന് കഴിയില്ല</string> <!-- Weather - Update frequency --> + <string name="weather_refresh_manual">മാനുവൽ</string> + <string name="weather_refresh_30min">30 മിനിറ്റ്</string> + <string name="weather_refresh_60min">60 മിനിറ്റ്</string> + <string name="weather_refresh_2hrs">2 മണിക്കൂർ</string> + <string name="weather_refresh_4hrs">4 മണിക്കൂർ</string> + <string name="weather_refresh_6hrs">6 മണിക്കൂർ</string> + <string name="weather_refresh_8hrs">8 മണിക്കൂർ</string> <!-- Preferences - Categories --> + <string name="clock_category">ക്ലോക്കും അലാറവും ആരവവും</string> + <string name="weather_category">കാലാവസ്ഥാ പാനൽ</string> + <string name="calendar_category">കലണ്ടർ ഇവന്റുകൾ</string> <!-- Preferences - Categories --> + <string name="general_category">പൊതുവായത്</string> + <string name="display_category">ദൃശ്യമാക്കുക</string> <!-- Preferences - Clock --> + <string name="use_digital_clock_title">ഡിജിറ്റൽ ക്ലോക്ക് ഉപയോഗിക്കുക</string> + <string name="use_digital_clock_summary">ഡിജിറ്റൽ, അനലോഗ് ക്ലോക്കുകള് തമ്മിൽ ടോഗിൾ ചെയ്യുന്നതിന് തിരഞ്ഞെടുക്കുക</string> + <string name="clock_font_title">ബോൾഡ് മണിക്കൂർ</string> + <string name="clock_font_minutes_title">ബോൾഡ് മിനിറ്റ്</string> + <string name="clock_font_date_title">ബോൾഡ് തീയതിയും അലാറവും</string> + <string name="show_alarm_title">അടുത്ത അലാറം കാണിക്കുക</string> + <string name="clock_am_pm_title">AM/PM ഇൻഡിക്കേറ്റർ കാണിക്കുക</string> <!-- Preferences - Weather --> + <string name="weather_enabled">പ്രവർത്തനക്ഷമമാക്കി</string> + <string name="weather_enable">കാലാവസ്ഥ പ്രദർശിപ്പിക്കുക</string> + <string name="weather_source_title">കാലാവസ്ഥ സ്രോതസ്സ്</string> + <string name="weather_use_custom_location">ഇഷ്ടാനുസൃത സ്ഥാനം ഉപയോഗിക്കുക</string> + <string name="weather_geolocated">ജിയോലൊക്കേറ്റ് നെറ്റ്വർക്ക് ഉപയോഗിക്കുന്നു</string> + <string name="weather_custom_location_dialog_title">സ്ഥലം രേഖപ്പെടുത്തുക</string> + <string name="weather_custom_location_hint">നഗരം, സംസ്ഥാനം/രാജ്യം</string> + <string name="weather_custom_location_title">ലൊക്കേഷൻ</string> + <string name="weather_show_location_title">സ്ഥാനം കാണിക്കുക</string> + <string name="weather_show_timestamp_title">ടൈം സ്റ്റാമ്പ് കാണിക്കുക</string> + <string name="weather_refresh_interval">പുതുക്കലിനുളള ഇടവേള</string> + <string name="weather_use_metric">മെട്രിക് ഉപയോഗിക്കുക</string> + <string name="weather_retrieve_location_dialog_title">സ്ഥാനം വീണ്ടെടുക്കാൻ കഴിയില്ല!</string> + <string name="weather_retrieve_location_dialog_message">നെറ്റ്വർക്ക് ജിയോലൊക്കേഷന് അപ്രാപ്തമാക്കി.\n\nഒരു ഇഷ്ടാനുസൃത സ്ഥലം സജ്ജമാക്കുക അല്ലെങ്കില് നെറ്റ്വർക്ക് സ്ഥാനം പ്രാപ്തമാക്കുക</string> + <string name="weather_retrieve_location_dialog_enable_button">പ്രവർത്തനക്ഷമമാക്കുക</string> + <string name="weather_invert_lowhigh">താഴ്ന്ന/ഉയർന്ന താപനിലകള് ഇന്വേര്ട്ട് ചെയ്യുക</string> + <string name="weather_progress_title">സ്ഥാനം പരിശോധിക്കുന്നു</string> + <string name="weather_alternate_icons_title">വര്ണ്ണ ഐക്കണുകൾ ഉപയോഗിക്കുക</string> + <string name="weather_alternate_icons_summary">ഡിഫോള്ട്ട് (വര്ണ്ണം), ഇതര (വെള്ള) ഐക്കണുകൾ തമ്മിൽ ടോഗിൾ ചെയ്യാന് തിരഞ്ഞെടുക്കുക</string> + <string name="weather_show_when_minimized_title">ചെറുതാക്കുമ്പോൾ കാണിക്കുക</string> + <string name="weather_show_when_minimized_summary">വിജറ്റ് ചെറുതാക്കുമ്പോള് സംഗ്രഹിച്ച കാലാവസ്ഥാ വിവരങ്ങൾ പ്രദര്ശിപ്പിക്കുക</string> + <string name="weather_select_location">സ്ഥാനം തിരഞ്ഞെടുക്കുക</string> <!-- Preferences - Calendar --> + <string name="calendar_title">അടുത്ത ഇവന്റ് പ്രദർശിപ്പിക്കുക</string> + <string name="calendars_title">ഇവന്റ് കലണ്ടറുകൾ</string> + <string name="calendars_summary">ഈ കലണ്ടറുകളിൽ നിന്നും ഇവന്റുകൾ കണ്ടെത്തുക</string> + <string name="calendars_none_found_summary">കലണ്ടറുകളൊന്നും കണ്ടെത്തിയില്ല</string> + <string name="calendar_reminders_only_title">ഓർമ്മപ്പെടുത്തലുകൾ മാത്രം</string> + <string name="calendar_reminders_only_summary">ഓർമ്മപ്പെടുത്തലുകൾ ഉള്ള ഇവന്റുകൾ മാത്രം കാണിക്കുക</string> + <string name="calendar_hide_allday_title">എല്ലാ ദിവസത്തെയും ഇവന്റുകൾ മറയ്ക്കുക</string> + <string name="calendar_icon_title">കലണ്ടർ ഐക്കൺ</string> + <string name="calendar_lookahead_title">ഇവന്റ് ലുക്ക്ഹെഡ്</string> + <string name="calendar_show_location_title">ഇവന്റ് സ്ഥാനം</string> + <string name="calendar_show_description_title">ഇവന്റ് വിവരണം</string> + <string name="calendar_upcoming_events_category">വരാനിരിക്കുന്ന ഇവന്റുകൾ</string> + <string name="calendar_highlight_upcoming_events_title">ഇവന്റുകൾ ഹൈലൈറ്റ് ചെയ്യുക</string> + <string name="calendar_highlight_upcoming_events_summary">ഇന്നത്തെ ദിവസത്തെ ഇവന്റുകളും, 8pm ന് ശേഷം, അതിനൊപ്പം അടുത്ത ദിവസത്തെ ഇവന്റുകളും ഹൈലൈറ്റ് ചെയ്യുക</string> + <string name="calendar_highlight_upcoming_events_bold">ബോൾഡ് ഫോണ്ട്</string> <!-- Preferences - Font colors --> + <string name="font_color">ഫോണ്ട് വര്ണ്ണം</string> + <string name="font_color_alarm">അലാറം ഫോണ്ട് വര്ണ്ണം</string> + <string name="font_color_timestamp">ടൈംസ്റ്റാമ്പ് ഫോണ്ട് വര്ണ്ണം</string> + <string name="font_color_calendar_details">വിവരങ്ങൾ ഫോണ്ട് വര്ണ്ണം</string> <!-- Preferences - Background color --> + <string name="background_color">പശ്ചാത്തല വര്ണം</string> + <string name="background_transparency">പശ്ചാത്തല സുതാര്യത</string> <!-- Calendar - Lookahead --> + <string name="calendar_lookahead_3hrs">3 മണിക്കൂർ</string> + <string name="calendar_lookahead_6hrs">6 മണിക്കൂർ</string> + <string name="calendar_lookahead_12hrs">12 മണിക്കൂർ</string> + <string name="calendar_lookahead_today">ഇന്ന്</string> + <string name="calendar_lookahead_1day">ഒരു ദിവസം</string> + <string name="calendar_lookahead_3days">3 ദിവസം</string> + <string name="calendar_lookahead_1wk">1 ആഴ്ച</string> + <string name="calendar_lookahead_2wks">2 ആഴ്ച</string> + <string name="calendar_lookahead_4wks">4 ആഴ്ച</string> <!-- Calendar - Event metadata --> + <string name="calendar_metadata_none">കാണിക്കരുത്</string> + <string name="calendar_metadata_first_line">ആദ്യ വരി കാണിക്കുക</string> + <string name="calendar_metadata_all">എല്ലാം കാണിക്കുക</string> <!-- Font colors --> + <string name="white">വെളുപ്പ്</string> + <string name="grey">ചാരനിറം</string> + <string name="black">കറുപ്പ്</string> + <string name="holo_blue_light">ഇളം നീല</string> + <string name="holo_green_light">ഇളം പച്ച</string> + <string name="holo_red_light">ഇളം ചുവപ്പ്</string> + <string name="holo_blue_dark">കടും നീല</string> + <string name="holo_green_dark">കടും പച്ച</string> + <string name="holo_red_dark">കടും ചുവപ്പ്</string> + <string name="holo_purple">പര്പ്പിള്</string> + <string name="holo_orange_light">ഇളം ഓറഞ്ച്</string> + <string name="holo_orange_dark">കടും ഓറഞ്ച്</string> + <string name="holo_blue_bright">തെളിഞ്ഞ നീല</string> <!-- Weather icon sets --> + <string name="weather_icon_set_title">ഐക്കണ് സജ്ജമാക്കുക</string> + <string name="weather_icons_standard">നിറമുള്ള</string> + <string name="weather_icons_monochrome">മോണോക്രോം</string> + <string name="icon_set_selection_get_more">കൂടുതൽ നേടുക\u2026</string> </resources> diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr-rIN/strings.xml index bcbe820..efe58f0 100644 --- a/res/values-mr-rIN/strings.xml +++ b/res/values-mr-rIN/strings.xml @@ -17,32 +17,190 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> + <string name="unknown">अज्ञात</string> + <string name="cancel">रद्द करा</string> + <string name="loading_indicator">विजेट लोड करीत आहे\u2026</string> + <string name="menu_done">पूर्ण केले</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> + <string name="weather_0">तूफान</string> + <string name="weather_1">उष्णदेशीय वादळ</string> + <string name="weather_2">चक्री वादळ</string> + <string name="weather_3">तीव्र गडगडाटी वादळ</string> + <string name="weather_4">गडगडाटी वादळ</string> + <string name="weather_5">मिश्र पाऊस आणि हिम</string> + <string name="weather_6">मिश्र पाऊस आणि गारांचा पाऊस</string> + <string name="weather_7">मिश्र हिम आणि गारांचा पाऊस</string> + <string name="weather_8">गोठवणारी रिमझीम</string> + <string name="weather_9">रिमझीम</string> + <string name="weather_10">गोठवणारा पाऊस</string> + <string name="weather_11">पाऊस</string> + <string name="weather_12">पाऊस</string> + <string name="weather_13">हिम वर्षाव</string> + <string name="weather_14">हलका हिम पाऊस</string> + <string name="weather_15">भुरभुरणारे हिम</string> + <string name="weather_16">हिम</string> + <string name="weather_17">गारा</string> + <string name="weather_18">गारांचा पाऊस</string> + <string name="weather_19">धूळ</string> + <string name="weather_20">अंधुक</string> + <string name="weather_21">धुके</string> + <string name="weather_22">धुरकट</string> + <string name="weather_23">घोंघावणारा वारा</string> + <string name="weather_24">वादळी</string> + <string name="weather_25">थंड</string> + <string name="weather_26">ढगाळ</string> <!-- Night --> + <string name="weather_27">बहुतांश ढगाळ</string> <!-- Day --> + <string name="weather_28">बहुतांश ढगाळ</string> <!-- Night --> + <string name="weather_29">आंशिक ढगाळ</string> <!-- Day --> + <string name="weather_30">आंशिक ढगाळ</string> <!-- Night --> + <string name="weather_31">साफ करा</string> + <string name="weather_32">सूर्यप्रकाश असलेले</string> <!-- Night --> + <string name="weather_33">चांगला</string> <!-- Day --> + <string name="weather_34">चांगला</string> + <string name="weather_35">मिश्र पाऊस आणि गारा</string> + <string name="weather_36">उष्ण</string> + <string name="weather_37">थोड्या थोड्या वेळाने झंझावात</string> + <string name="weather_38">काही वेळाच्या अंतराने झंझावात</string> + <string name="weather_39">काही वेळाच्या अंतराने झंझावात</string> + <string name="weather_40">काही वेळाच्या अंतराने पाऊस</string> + <string name="weather_41">जोरदार हिम</string> + <string name="weather_42">काही वेळाच्या हिम वर्षाव</string> + <string name="weather_43">जोरदार हिम</string> + <string name="weather_44">आंशिक ढगाळ</string> + <string name="weather_45">गडगडाटी पाऊस</string> + <string name="weather_46">हिम वर्षाव</string> + <string name="weather_47">थोड्या थोड्या वेळाने गडगडाटी पाऊस</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> + <string name="weather_kph">kph</string> + <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> + <string name="weather_N">N</string> + <string name="weather_NE">NE</string> + <string name="weather_E">E</string> + <string name="weather_SE">SE</string> + <string name="weather_S">S</string> + <string name="weather_SW">SW</string> + <string name="weather_W">W</string> + <string name="weather_NW">NW</string> <!-- Weather - Error messages --> + <string name="weather_no_data">डेटा नाही</string> + <string name="weather_tap_to_refresh">रिफ्रेश करण्यासाठी टॅप करा</string> + <string name="weather_refreshing">रिफ्रेश करत आहे</string> + <string name="weather_last_sync_just_now">आत्ताच</string> + <string name="weather_cannot_reach_provider">या क्षणी %s पर्यंत पोहोचू शकत नाही</string> <!-- Weather - Update frequency --> + <string name="weather_refresh_manual">व्यक्तिचलित</string> + <string name="weather_refresh_30min">30 मिनिटे</string> + <string name="weather_refresh_60min">60 मिनिटे</string> + <string name="weather_refresh_2hrs">2 तास</string> + <string name="weather_refresh_4hrs">4 तास</string> + <string name="weather_refresh_6hrs">6 तास</string> + <string name="weather_refresh_8hrs">8 तास</string> <!-- Preferences - Categories --> + <string name="clock_category">घड्याळ आणि अलार्म</string> + <string name="weather_category">हवामान पॅनेल</string> + <string name="calendar_category">दिनदर्शिका इव्हेंट्स</string> <!-- Preferences - Categories --> + <string name="general_category">सामान्य</string> + <string name="display_category">प्रदर्शित करा</string> <!-- Preferences - Clock --> + <string name="use_digital_clock_title">डिजिटल घड्याळ वापरा</string> + <string name="use_digital_clock_summary">डिजिटल आणि ऍनालॉग घड्याळांदरम्यान टॉगल निवडा</string> + <string name="clock_font_title">ठळक तास</string> + <string name="clock_font_minutes_title">ठळक मिनिटे</string> + <string name="clock_font_date_title">ठळक तारीख आणि अलार्म</string> + <string name="show_alarm_title">पुढील अलार्म दर्शवा</string> + <string name="clock_am_pm_title">AM/PM निदर्शक दर्शवा</string> <!-- Preferences - Weather --> + <string name="weather_enabled">सक्षम केले</string> + <string name="weather_enable">हवामान प्रदर्शित करा</string> + <string name="weather_source_title">हवामान स्त्रोत</string> + <string name="weather_use_custom_location">सानुकूल स्थान वापरा</string> + <string name="weather_geolocated">नेटवर्क वापरून भौगोलिक स्थानिय</string> + <string name="weather_custom_location_dialog_title">स्थान प्रविष्ठ करा</string> + <string name="weather_custom_location_hint">शहर, राज्य/देश</string> + <string name="weather_custom_location_title">स्थान</string> + <string name="weather_show_location_title">स्थान दर्शवा</string> + <string name="weather_show_timestamp_title">वेळशिक्का दर्शवा</string> + <string name="weather_refresh_interval">अद्यतन मध्यांतर</string> + <string name="weather_use_metric">मेट्रिक वापरा</string> + <string name="weather_retrieve_location_dialog_title">स्थान पुनर्प्राप्त करू शकत नाही!</string> + <string name="weather_retrieve_location_dialog_message">नेटवर्क भौगोलिक स्थान अक्षम केलेले आहे.\n\nसानुकूल स्थान सेट करा किंवा नेटवर्क स्थान सक्षम करा</string> + <string name="weather_retrieve_location_dialog_enable_button">सक्षम करा</string> + <string name="weather_invert_lowhigh">उलट कमी/उच्च तापमाने</string> + <string name="weather_progress_title">स्थाने सत्यापित करा</string> + <string name="weather_alternate_icons_title">रंग प्रतीके वापरा</string> + <string name="weather_alternate_icons_summary">डिफॉल्ट (रंग) आणि पर्यायी (पांढरा) प्रतीकांदरम्यान टॉगल करण्यासाठी निवडा</string> + <string name="weather_show_when_minimized_title">कमी केलेले असताना दर्शवा</string> + <string name="weather_show_when_minimized_summary">विजेट कमी केलेले असताना हवामान सारांश माहिती प्रदर्शित करा</string> + <string name="weather_select_location">स्थान निवडा</string> <!-- Preferences - Calendar --> + <string name="calendar_title">पुढील इव्हेंट प्रदर्शित करा</string> + <string name="calendars_title">इव्हेंट दिनदर्शिका</string> + <string name="calendars_summary">ह्या दिनदर्शिकामधून इव्हेंट्स शोधा</string> + <string name="calendars_none_found_summary">कॅलेंडर्स सापडले नाहीत</string> + <string name="calendar_reminders_only_title">केवळ स्मरणपत्रे</string> + <string name="calendar_reminders_only_summary">केवळ स्मरणपत्रांसह इव्हेंट्स दर्शवा</string> + <string name="calendar_hide_allday_title">संपूर्ण-दिवस इव्हेंट्स लपवा</string> + <string name="calendar_icon_title">दिनदर्शिका प्रतीक</string> + <string name="calendar_lookahead_title">इव्हेंट पुढे पाहा</string> + <string name="calendar_show_location_title">इव्हेंट स्थान</string> + <string name="calendar_show_description_title">इव्हेंट वर्णन</string> + <string name="calendar_upcoming_events_category">आगामी इव्हेंट्स</string> + <string name="calendar_highlight_upcoming_events_title">इव्हेंट्स हायलाईट करा</string> + <string name="calendar_highlight_upcoming_events_summary">चालू दिवसाच्या इव्हेंट्स हायलाईट करा आणि रात्री 8 नंतर, दुसऱ्या दिवशीच्या इव्हेंट्स सुध्दा</string> + <string name="calendar_highlight_upcoming_events_bold">ठळक फाँट</string> <!-- Preferences - Font colors --> + <string name="font_color">फाँट रंग</string> + <string name="font_color_alarm">अलार्म फाँट रंग</string> + <string name="font_color_timestamp">वेळशिक्का फाँट रंग</string> + <string name="font_color_calendar_details">तपशील फाँट रंग</string> <!-- Preferences - Background color --> + <string name="background_color">पार्श्वभूमी रंग</string> + <string name="background_transparency">पार्श्वभूमी पारदर्शकता</string> <!-- Calendar - Lookahead --> + <string name="calendar_lookahead_3hrs">3 तास</string> + <string name="calendar_lookahead_6hrs">6 तास</string> + <string name="calendar_lookahead_12hrs">12 तास</string> + <string name="calendar_lookahead_today">आज</string> + <string name="calendar_lookahead_1day">1 दिवस</string> + <string name="calendar_lookahead_3days">3 दिवस</string> + <string name="calendar_lookahead_1wk">1 आठवडा</string> + <string name="calendar_lookahead_2wks">2 आठवडे</string> + <string name="calendar_lookahead_4wks">4 आठवडे</string> <!-- Calendar - Event metadata --> + <string name="calendar_metadata_none">दाखवू नका</string> + <string name="calendar_metadata_first_line">पहिली ओळ दर्शवा</string> + <string name="calendar_metadata_all">सर्व दर्शवा</string> <!-- Font colors --> + <string name="white">पांढरा</string> + <string name="grey">करडा</string> + <string name="black">काळा</string> + <string name="holo_blue_light">फिकट निळा</string> + <string name="holo_green_light">फिकट हिरवा</string> + <string name="holo_red_light">फिकट लाल</string> + <string name="holo_blue_dark">गडद निळा</string> + <string name="holo_green_dark">गडद हिरवा</string> + <string name="holo_red_dark">गडद लाल</string> + <string name="holo_purple">जांभळा</string> + <string name="holo_orange_light">फिकट केशरी</string> + <string name="holo_orange_dark">गडद केशरी</string> + <string name="holo_blue_bright">चमकदार निळा</string> <!-- Weather icon sets --> + <string name="weather_icon_set_title">प्रतीक सेट केले</string> + <string name="weather_icons_standard">रंगीत</string> + <string name="weather_icons_monochrome">मोनोक्रोम</string> + <string name="icon_set_selection_get_more">अधिक मिळवा\u2026</string> </resources> diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml index 73baa23..18d2f11 100644 --- a/res/values-nb/strings.xml +++ b/res/values-nb/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Oppdaterer</string> <string name="weather_last_sync_just_now">Nå</string> <string name="weather_cannot_reach_provider">Kan ikke nå %s for øyeblikket</string> + <string name="weather_source_not_selected">Ingen værtjeneste valgt</string> + <string name="weather_tap_to_select_source">Trykk for å velge en</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manuelt</string> <string name="weather_refresh_30min">30 minutter</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Aktivert</string> <string name="weather_enable">Vis vær</string> <string name="weather_source_title">Vær-kilde</string> - <string name="weather_source_yahoo">Yahoo! Været</string> <string name="weather_use_custom_location">Bruk egen posisjon</string> <string name="weather_geolocated">Geolokalisert via nettverk</string> <string name="weather_custom_location_dialog_title">Oppgi posisjon</string> @@ -151,6 +152,7 @@ <string name="calendar_title">Vis neste oppføring</string> <string name="calendars_title">Kalendere</string> <string name="calendars_summary">Finn oppføringer fra disse kalenderne</string> + <string name="calendars_none_found_summary">Ingen kalendere funnet</string> <string name="calendar_reminders_only_title">Bare påminnelser</string> <string name="calendar_reminders_only_summary">Bare vis oppføringer med påminnelser</string> <string name="calendar_hide_allday_title">Skjul heldagsoppføringer</string> diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 02f9228..cfa6e1c 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -50,7 +50,7 @@ <string name="weather_21">Heiig</string> <string name="weather_22">Walmend</string> <string name="weather_23">Stormachtig</string> - <string name="weather_24">Waaierig</string> + <string name="weather_24">Winderig</string> <string name="weather_25">Koud</string> <string name="weather_26">Bewolkt</string> <!-- Night --> @@ -100,6 +100,8 @@ <string name="weather_refreshing">Vernieuwen\u2026</string> <string name="weather_last_sync_just_now">Zojuist</string> <string name="weather_cannot_reach_provider">%s momenteel niet bereikbaar</string> + <string name="weather_source_not_selected">Geen weerbron geselecteerd</string> + <string name="weather_tap_to_select_source">Tik om te selecteren</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Handmatig</string> <string name="weather_refresh_30min">0,5 uur</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Ingeschakeld</string> <string name="weather_enable">Weer tonen</string> <string name="weather_source_title">Weerbron</string> - <string name="weather_source_yahoo">Yahoo! Weer</string> <string name="weather_use_custom_location">Aangepaste locatie</string> <string name="weather_geolocated">Locatie bepalen door netwerk</string> <string name="weather_custom_location_dialog_title">Locatie invoeren</string> diff --git a/res/values-or-rIN/strings.xml b/res/values-or-rIN/strings.xml index bcbe820..7da9377 100644 --- a/res/values-or-rIN/strings.xml +++ b/res/values-or-rIN/strings.xml @@ -17,32 +17,190 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> + <string name="unknown">ଅଜ୍ଞାତ</string> + <string name="cancel">ବାତିଲ</string> + <string name="loading_indicator">ୱି୍ଜେଟ ଲୋଡ ହେଉଛି\u2026</string> + <string name="menu_done">ସମାପ୍ତ</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> + <string name="weather_0">ଟର୍ଣାଡୋ</string> + <string name="weather_1">ଟ୍ରୋପିକାଲ୍ ଷ୍ଟର୍ମ୍</string> + <string name="weather_2">ହରିକେନ୍</string> + <string name="weather_3">ଭୀଷଣ ତୁଷାରଝଡ</string> + <string name="weather_4">ତୁଷାରଝଡ</string> + <string name="weather_5">ମିଶ୍ରିତ ବର୍ଷା ଓ ତୁଷାର</string> + <string name="weather_6">ମିଶ୍ରିତ ବର୍ଷା ଓ ତୁଷାର</string> + <string name="weather_7">ମିଶ୍ରିତ ବର୍ଷା ଓ ତୁଷାର</string> + <string name="weather_8">ହିମ ଝିପିଝିପି ବର୍ଷା</string> + <string name="weather_9">ଝିପିଝିପି ବର୍ଷା</string> + <string name="weather_10">ହିମ ବର୍ଷା</string> + <string name="weather_11">ବର୍ଷା ହେବା</string> + <string name="weather_12">ବର୍ଷା ହେବା</string> + <string name="weather_13">ବରଫପାତ</string> + <string name="weather_14">ହାଲ୍କା ବରଫପାତ</string> + <string name="weather_15">ଜୋର୍ରେ ବରଫ ପଡିବା</string> + <string name="weather_16">ବରଫ</string> + <string name="weather_17">ହେଲ୍</string> + <string name="weather_18">ବରଫ</string> + <string name="weather_19">ଧୂଳି</string> + <string name="weather_20">କୁହୁଡିଆ</string> + <string name="weather_21">ହେଜ୍</string> + <string name="weather_22">ଧୂଆଁଦାର</string> + <string name="weather_23">ବ୍ଲଷ୍ଟେରି</string> + <string name="weather_24">ୱିଣ୍ଡି</string> + <string name="weather_25">ଥଣ୍ଡା</string> + <string name="weather_26">ମେଘୁଆ</string> <!-- Night --> + <string name="weather_27">ଅଧିକାଂଶ ମେଘୁଆ</string> <!-- Day --> + <string name="weather_28">ଅଧିକାଂଶ ମେଘୁଆ</string> <!-- Night --> + <string name="weather_29">ଆଂଶିକ ମେଘୁଆ</string> <!-- Day --> + <string name="weather_30">ଆଂଶିକ ମେଘୁଆ</string> <!-- Night --> + <string name="weather_31">ଖାଲି</string> + <string name="weather_32">ଖରାପାଗ</string> <!-- Night --> + <string name="weather_33">ନିରପେକ୍ଷ</string> <!-- Day --> + <string name="weather_34">ନିରପେକ୍ଷ</string> + <string name="weather_35">ମିଶ୍ରିତ ବର୍ଷା ଓ ତୁଷାରପାତ</string> + <string name="weather_36">ଗରମ</string> + <string name="weather_37">ଗୋଟିଏ ସ୍ଥାନରେ ଘଡଘଡି ସହ ବର୍ଷା</string> + <string name="weather_38">ବିକ୍ଷିପ୍ତ ଭାବେ ଘଡଘଡି ସହ ବର୍ଷା</string> + <string name="weather_39">ବିକ୍ଷିପ୍ତ ଭାବେ ଘଡଘଡି ସହ ବର୍ଷା</string> + <string name="weather_40">ବିକ୍ଷିପ୍ତ ଭାବେ ବର୍ଷା</string> + <string name="weather_41">ଅଧିକ ବରଫ</string> + <string name="weather_42">ବିକ୍ଷିପ୍ତ ଭାବେ ତୁଷାରପାତ</string> + <string name="weather_43">ଅଧିକ ବରଫ</string> + <string name="weather_44">ଆଂଶିକ ମେଘୁଆ</string> + <string name="weather_45">ଘଡଘଡି ସହ ବର୍ଷା</string> + <string name="weather_46">ତୁଷାର ବର୍ଷା</string> + <string name="weather_47">ଗୋଟିଏ ସ୍ଥାନରେ ଘଡଘଡି ସହ ବର୍ଷା</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> + <string name="weather_kph">kph</string> + <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> + <string name="weather_N">ଉ.</string> + <string name="weather_NE">ଉ.ପୂ</string> + <string name="weather_E">ପୂ</string> + <string name="weather_SE">ଦ.ପୂ</string> + <string name="weather_S">ଦ</string> + <string name="weather_SW">ଦ.ପ</string> + <string name="weather_W">ପ.</string> + <string name="weather_NW">ଉ.ଦ.</string> <!-- Weather - Error messages --> + <string name="weather_no_data">କୌଣସି ଡାଟା ନାହିଁ</string> + <string name="weather_tap_to_refresh">ସତେଜ କରିବା ପାଇଁ ଟ୍ୟାପ୍ କରନ୍ତୁ</string> + <string name="weather_refreshing">ପୁନଃସତେଜ କରୁଛି</string> + <string name="weather_last_sync_just_now">ଏହି ମାତ୍ର</string> + <string name="weather_cannot_reach_provider">%s ରେ ଏହି କ୍ଷଣ</string> <!-- Weather - Update frequency --> + <string name="weather_refresh_manual">ମାନୁଆଲ୍</string> + <string name="weather_refresh_30min">30 ମିନିଟ୍</string> + <string name="weather_refresh_60min">60 ମିନିଟ୍</string> + <string name="weather_refresh_2hrs">2 ଘଣ୍ଟା</string> + <string name="weather_refresh_4hrs">4 ଘଣ୍ଟା</string> + <string name="weather_refresh_6hrs">6 ଘଣ୍ଟା</string> + <string name="weather_refresh_8hrs">8 ଘଣ୍ଟା</string> <!-- Preferences - Categories --> + <string name="clock_category">ଘଣ୍ଟା ଓ ଆଲାର୍ମ୍</string> + <string name="weather_category">ପାଣିପାଗ ପ୍ୟାନେଲ୍</string> + <string name="calendar_category">କ୍ୟା୍ଲେଣ୍ଡର ଇଭେଣ୍ଟସମୂହ</string> <!-- Preferences - Categories --> + <string name="general_category">ସାଧାରଣ</string> + <string name="display_category">ପ୍ରଦର୍ଶନ</string> <!-- Preferences - Clock --> + <string name="use_digital_clock_title">ଡିଜିଟାଲ୍ ଘଣ୍ଟା ବ୍ୟବହାର କରନ୍ତୁ</string> + <string name="use_digital_clock_summary">ଡିଜିଟାଲ୍ ଓ ଆନାଲଗ୍ ଘଣ୍ଟା ମଧ୍ୟରେ ଟୋଗଲ୍ କରିବା ପାଇଁ ଚୟନ କରନ୍ତୁ</string> + <string name="clock_font_title">ବୋଲ୍ଡ ଘଣ୍ଟା</string> + <string name="clock_font_minutes_title">ବୋଲ୍ଡ ମିନିଟ୍</string> + <string name="clock_font_date_title">ବ୍ନୋଲ୍ଡ ତାରିଖ ଓ ଆଲାର୍ମ</string> + <string name="show_alarm_title">ପର ଆଲାର୍ମ ଦେଖାନ୍ତୁ</string> + <string name="clock_am_pm_title">AM/PM ସୁଚକ ଦେଖାନ୍ତୁ</string> <!-- Preferences - Weather --> + <string name="weather_enabled">ସକ୍ଷମ ହୋଇଛି</string> + <string name="weather_enable">ପାଣିପାଗ ଦେଖାନ୍ତୁ</string> + <string name="weather_source_title">ପାଣିପାଗ ଉତ୍ସ</string> + <string name="weather_use_custom_location">କଷ୍ଟମ୍ ଅବଥାନ ବ୍ୟବହାର କରନ୍ତୁ</string> + <string name="weather_geolocated">ନେଟ୍ୱାର୍କ ବ୍ୟବହାର କରି ଭୂସ୍ଥାନ ନିର୍ଧାରଣ</string> + <string name="weather_custom_location_dialog_title">ଅବଥାନ ପ୍ରବେଶ କରନ୍ତୁ</string> + <string name="weather_custom_location_hint">ସହର, ରା୍ଜ୍ୟ/ଦେଶ</string> + <string name="weather_custom_location_title">ଅବସ୍ଥାନ</string> + <string name="weather_show_location_title">ଅବସ୍ଥାନ ଦେଖାନ୍ତୁ</string> + <string name="weather_show_timestamp_title">ଟାଇଷ୍ଟାମ୍ପ୍ ଦେଖାନ୍ତୁ</string> + <string name="weather_refresh_interval">ବ୍ୟବଧାନ ଅଦ୍ୟତନ କର୍ନ୍ତୁ</string> + <string name="weather_use_metric">ମେଟ୍ରିକ୍ ବ୍ୟବହାର କର୍ନ୍ତୁ</string> + <string name="weather_retrieve_location_dialog_title">ଅବସ୍ଥାନ ପ୍ରାପ୍ତ କରିହେବ ନାହିଁ!</string> + <string name="weather_retrieve_location_dialog_message">ନେଟ୍ୱାର୍କ୍ ଭୌଗୋଳିକ ଅବସ୍ଥାନ ଅକ୍ଷମ କରାଯାଇଛି।\n\nକଷ୍ଟମ୍ ଅବସ୍ଥାନ ସେଟ୍ କରନ୍ତୁ ବା ନେଟ୍ୱର୍କ ଅବସ୍ଥାନ ସକ୍ଷମ କରନ୍ତୁ</string> + <string name="weather_retrieve_location_dialog_enable_button">ସକ୍ଷମ</string> + <string name="weather_invert_lowhigh">କମ୍/ଅଧିକ ତାପମାତ୍ରା ଇଭର୍ଟ କରନ୍ତୁ</string> + <string name="weather_progress_title">ଅବସ୍ଥାନ ପରୀକ୍ଷିତ କରାଯାଉଛି</string> + <string name="weather_alternate_icons_title">ରଙ୍ଗ ଆଇ୍କନ୍ଗୁଡିକ ବ୍ୟବହାର କରନ୍ର୍ତୁ</string> + <string name="weather_alternate_icons_summary">ଡିଫଲ୍ଟ (ରଙ୍ଗ) ଓ ବିକଳ୍ପ (ଧଳା) ଆଇକନ୍ଗୁଡିକ ମଧ୍ୟରେ ଟୋଗଲ୍ କରିବା ପାଇଁ ଚୟନ କରନ୍ତୁ</string> + <string name="weather_show_when_minimized_title">ହ୍ରାସ କରାଯାଇଥିବା ସମୟରେ ଦେଖାନ୍ତୁ</string> + <string name="weather_show_when_minimized_summary">ୱିଜେଟ୍ ହ୍ରାସ କରାଯାଇଥିବା ସମୟରେ ପଣିପାଗ ସୂଚନାର ସଂକ୍ଷିପ୍ତ ବିବରଣୀ ଦେଖାନ୍ତୁ</string> + <string name="weather_select_location">ଅବସ୍ଥାନ ଚୟନ କରନ୍ତୁ</string> <!-- Preferences - Calendar --> + <string name="calendar_title">ପର ଘଟଣାକ୍ରମ ଦେଖା୍ନ୍ତୁ</string> + <string name="calendars_title">ଘଟଣାକ୍ରମ କ୍ୟାଲେଣ୍ଡର</string> + <string name="calendars_summary">ଏହି କ୍ୟାଲେଣ୍ଡରରୁ ଇଭେଣ୍ଟସମୂହ ପ୍ରାପ୍ତ କରନ୍ତୁ</string> + <string name="calendars_none_found_summary">କୌଣସି କ୍ୟାଲେଣ୍ଡର୍ ନାହିଁ</string> + <string name="calendar_reminders_only_title">କେବଳ ରିମେଣ୍ଡର</string> + <string name="calendar_reminders_only_summary">ରିମେଣ୍ଡର ସହିତ କେବଳ ସଂଚାଳନକ୍ରମ ଦେଖାନ୍ତୁ</string> + <string name="calendar_hide_allday_title">ସମସ୍ତ-ଦିନର ଇଭେଣ୍ଟସମୂହ ଲୁଚାନ୍ତୁ</string> + <string name="calendar_icon_title">କ୍ୟାଲେଣ୍ଡର ଆଇକନ୍</string> + <string name="calendar_lookahead_title">ଘଟଣାକ୍ରମ ଦେଖିବା</string> + <string name="calendar_show_location_title">ଘଟଣାକ୍ରମ ଅବସ୍ଥାନ</string> + <string name="calendar_show_description_title">ଘଟଣାକ୍ରମ ବର୍ଣ୍ଣନା</string> + <string name="calendar_upcoming_events_category">ଆଗକୁ ଥିବା ଇଭେଣ୍ଟସମୂହ</string> + <string name="calendar_highlight_upcoming_events_title">ହାଇଲାଇଟ୍ ଇଭେଣ୍ଟସମୂହ</string> + <string name="calendar_highlight_upcoming_events_summary">ସମ୍ପ୍ରତି ଦିନର ଘଟଣାକ୍ରମ ଓ, 8pm ପରେ, ପର ଦିନର ଘଟଣାକ୍ରମ ମଧ୍ୟ ହାଇଲାଇଟ୍ କରନ୍ତୁ</string> + <string name="calendar_highlight_upcoming_events_bold">ବୋଲ୍ଡ ଫଣ୍ଟ</string> <!-- Preferences - Font colors --> + <string name="font_color">ଫଣ୍ଟ ରଙ୍ଗ</string> + <string name="font_color_alarm">ଆଲାର୍ମ୍ ଫଣ୍ଟ ରଙ୍ଗ</string> + <string name="font_color_timestamp">ଟାଇଷ୍ଟାମ୍ପ ଫଣ୍ଟ ରଙ୍ଗ</string> + <string name="font_color_calendar_details">ଫଣ୍ଟ ରଙ୍ଗ ବିବରଣୀ</string> <!-- Preferences - Background color --> + <string name="background_color">ପୃଷ୍ଠପଟ ରଙ୍ଗ</string> + <string name="background_transparency">ପୃଷ୍ଠପଟ ସ୍ୱଛତା</string> <!-- Calendar - Lookahead --> + <string name="calendar_lookahead_3hrs">3 ଘଣ୍ଟା</string> + <string name="calendar_lookahead_6hrs">6 ଘଣ୍ଟା</string> + <string name="calendar_lookahead_12hrs">12 ଘଣ୍ଟା</string> + <string name="calendar_lookahead_today">ଆଜି</string> + <string name="calendar_lookahead_1day">୧ ଦିନ</string> + <string name="calendar_lookahead_3days">3 ଦିନ</string> + <string name="calendar_lookahead_1wk">1 ସପ୍ତାହ</string> + <string name="calendar_lookahead_2wks">2 ସପ୍ତାହ</string> + <string name="calendar_lookahead_4wks">4 ସପ୍ତାହ</string> <!-- Calendar - Event metadata --> + <string name="calendar_metadata_none">ଦେଖାନ୍ତୁ ନାହିଁ</string> + <string name="calendar_metadata_first_line">ପ୍ରଥମ ଧାଡି ଦେଖାନ୍ତୁ</string> + <string name="calendar_metadata_all">ସମସ୍ତ ଦେଖାନ୍ତୁ</string> <!-- Font colors --> + <string name="white">ଧଳା</string> + <string name="grey">ଧୂସର</string> + <string name="black">କଳା</string> + <string name="holo_blue_light">ଫିକା ନୀଳ</string> + <string name="holo_green_light">ଫିକା ସବୁଜ</string> + <string name="holo_red_light">ଫିକା ଲାଲ୍</string> + <string name="holo_blue_dark">ଗାଢ ନୀଳ</string> + <string name="holo_green_dark">ଗାଢ ସବୁଜ</string> + <string name="holo_red_dark">ଗାଢ ଲାଲ୍</string> + <string name="holo_purple">ପର୍ପଲ୍</string> + <string name="holo_orange_light">ଫିକା କମଳା</string> + <string name="holo_orange_dark">ଗାଢ କମଳା</string> + <string name="holo_blue_bright">ଉଜ୍ଜ୍ୱଳ ନୀଳ</string> <!-- Weather icon sets --> + <string name="weather_icon_set_title">ଆଇକନ୍ ସେଟ୍</string> + <string name="weather_icons_standard">ରଙ୍ଗ ହୋଇଥିବା</string> + <string name="weather_icons_monochrome">ମନୋକ୍ରୋମ୍</string> + <string name="icon_set_selection_get_more">ଅଧିକ ପ୍ରାପ୍ତ କରନ୍ତୁ\u2026</string> </resources> diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index f2d617a..408c89b 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -20,7 +20,7 @@ <string name="unknown">Nieznane</string> <string name="cancel">Anuluj</string> <string name="loading_indicator">Uruchamianie widżetu\u2026</string> - <string name="menu_done">Wykonano</string> + <string name="menu_done">Gotowe</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. @@ -100,6 +100,8 @@ <string name="weather_refreshing">Odświeżanie</string> <string name="weather_last_sync_just_now">Teraz</string> <string name="weather_cannot_reach_provider">%s poza zasięgiem</string> + <string name="weather_source_not_selected">Nie wybrano źródła pogody</string> + <string name="weather_tap_to_select_source">Dotknij, aby wybrać jedno</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Ręcznie</string> <string name="weather_refresh_30min">30 minut</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Włączone</string> <string name="weather_enable">Wyświetl pogodę</string> <string name="weather_source_title">Źródło informacji o pogodzie</string> - <string name="weather_source_yahoo">Pogoda Yahoo!</string> <string name="weather_use_custom_location">Użyj własnej lokalizacji</string> <string name="weather_geolocated">Użyj sieci do lokalizacji</string> <string name="weather_custom_location_dialog_title">Podaj lokalizację</string> diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml index 1d577e6..b1797fb 100644 --- a/res/values-pt-rBR/strings.xml +++ b/res/values-pt-rBR/strings.xml @@ -27,60 +27,60 @@ We need to support both --> <!-- Weather - Weather codes --> <string name="weather_0">Tornado</string> - <string name="weather_1">Tempestade Tropical</string> + <string name="weather_1">Tempestade tropical</string> <string name="weather_2">Furacão</string> - <string name="weather_3">Tempestades Fortes</string> + <string name="weather_3">Tempestades fortes</string> <string name="weather_4">Tempestades</string> - <string name="weather_5">Chuva e Neve Misturados</string> - <string name="weather_6">Chuva e Geada Misturados</string> - <string name="weather_7">Neve e Geada Misturados</string> - <string name="weather_8">Chuvisco Congelante</string> - <string name="weather_9">Chuvisco</string> - <string name="weather_10">Chuva Congelante</string> - <string name="weather_11">Chuva</string> - <string name="weather_12">Chuva</string> - <string name="weather_13">Flocos de Neve</string> - <string name="weather_14">Chuva de Neve Fraca</string> - <string name="weather_15">Tempestade de Neve</string> + <string name="weather_5">Mistura de chuva e neve</string> + <string name="weather_6">Mistura de chuva e geada</string> + <string name="weather_7">Mistura de neve e geada</string> + <string name="weather_8">Garoa congelante</string> + <string name="weather_9">Garoa</string> + <string name="weather_10">Chuva congelante</string> + <string name="weather_11">Pancadas de chuva</string> + <string name="weather_12">Pancadas de chuva</string> + <string name="weather_13">Flocos de neve</string> + <string name="weather_14">Chuva de neve fraca</string> + <string name="weather_15">Tempestade de neve</string> <string name="weather_16">Neve</string> <string name="weather_17">Granizo</string> <string name="weather_18">Geada</string> <string name="weather_19">Poeira</string> - <string name="weather_20">Nebuloso</string> + <string name="weather_20">Névoa</string> <string name="weather_21">Neblina</string> <string name="weather_22">Enfumaçado</string> - <string name="weather_23">Ventos Fortes</string> + <string name="weather_23">Ventos fortes</string> <string name="weather_24">Ventania</string> <string name="weather_25">Frio</string> <string name="weather_26">Nublado</string> <!-- Night --> - <string name="weather_27">Maior Parte Nublado</string> + <string name="weather_27">Encoberto</string> <!-- Day --> - <string name="weather_28">Maior Parte Nublado</string> + <string name="weather_28">Encoberto</string> <!-- Night --> - <string name="weather_29">Parcialmente Nublado</string> + <string name="weather_29">Parcialmente nublado</string> <!-- Day --> - <string name="weather_30">Parcialmente Nublado</string> + <string name="weather_30">Parcialmente nublado</string> <!-- Night --> <string name="weather_31">Limpo</string> <string name="weather_32">Ensolarado</string> <!-- Night --> - <string name="weather_33">Razoável</string> + <string name="weather_33">Bom</string> <!-- Day --> - <string name="weather_34">Razoável</string> - <string name="weather_35">Chuva e Granizo Misturados</string> + <string name="weather_34">Bom</string> + <string name="weather_35">Misto de chuva e granizo</string> <string name="weather_36">Quente</string> - <string name="weather_37">Tempestades Isoladas</string> - <string name="weather_38">Tempestades Dispersas</string> - <string name="weather_39">Tempestades Dispersas</string> - <string name="weather_40">Chuvas Dispersas</string> - <string name="weather_41">Nevasca Forte</string> - <string name="weather_42">Neve Dispersa</string> - <string name="weather_43">Nevasca Forte</string> - <string name="weather_44">Parcialmente Nublado</string> - <string name="weather_45">Chuvas com Trovoadas</string> - <string name="weather_46">Chuva de Neve</string> - <string name="weather_47">Chuvas com Trovoadas Isoladas</string> + <string name="weather_37">Tempestades isoladas</string> + <string name="weather_38">Tempestades dispersas</string> + <string name="weather_39">Tempestades dispersas</string> + <string name="weather_40">Chuvas dispersas</string> + <string name="weather_41">Nevasca forte</string> + <string name="weather_42">Neve dispersa</string> + <string name="weather_43">Nevasca forte</string> + <string name="weather_44">Parcialmente nublado</string> + <string name="weather_45">Chuvas com trovoadas</string> + <string name="weather_46">Chuva de neve</string> + <string name="weather_47">Chuvas com trovoadas isoladas</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> <string name="weather_kph">km/h</string> @@ -88,7 +88,7 @@ <!-- Weather - Wind directions --> <string name="weather_N">N</string> <string name="weather_NE">NE</string> - <string name="weather_E">E</string> + <string name="weather_E">L</string> <string name="weather_SE">SE</string> <string name="weather_S">S</string> <string name="weather_SW">SO</string> @@ -96,10 +96,12 @@ <string name="weather_NW">NO</string> <!-- Weather - Error messages --> <string name="weather_no_data">Sem dados</string> - <string name="weather_tap_to_refresh">Aperte para atualizar</string> + <string name="weather_tap_to_refresh">Toque para atualizar</string> <string name="weather_refreshing">Atualizando</string> - <string name="weather_last_sync_just_now">Agora mesmo</string> + <string name="weather_last_sync_just_now">Há pouco</string> <string name="weather_cannot_reach_provider">Não foi possível alcançar %s</string> + <string name="weather_source_not_selected">Nenhuma fonte de previsão do tempo selecionada</string> + <string name="weather_tap_to_select_source">Toque para selecionar uma</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manual</string> <string name="weather_refresh_30min">30 minutos</string> @@ -110,47 +112,46 @@ <string name="weather_refresh_8hrs">8 horas</string> <!-- Preferences - Categories --> <string name="clock_category">Relógio e alarme</string> - <string name="weather_category">Painel do tempo</string> + <string name="weather_category">Painel do clima</string> <string name="calendar_category">Eventos do calendário</string> <!-- Preferences - Categories --> <string name="general_category">Geral</string> <string name="display_category">Exibir</string> <!-- Preferences - Clock --> - <string name="use_digital_clock_title">Usar relógio Digital</string> - <string name="use_digital_clock_summary">Selecione para alternar entre relógio Digital e Analógico</string> + <string name="use_digital_clock_title">Usar relógio digital</string> + <string name="use_digital_clock_summary">Selecione para alternar entre digital e analógico</string> <string name="clock_font_title">Horas em negrito</string> <string name="clock_font_minutes_title">Minutos em negrito</string> - <string name="clock_font_date_title">Data e minutos em negrito</string> + <string name="clock_font_date_title">Data e alarme em negrito</string> <string name="show_alarm_title">Exibir próximo alarme</string> <string name="clock_am_pm_title">Exibir indicador AM/PM</string> <!-- Preferences - Weather --> <string name="weather_enabled">Ativado</string> - <string name="weather_enable">Exibir tempo</string> - <string name="weather_source_title">Fonte de dados</string> - <string name="weather_source_yahoo">Yahoo! Tempo</string> + <string name="weather_enable">Exibir clima</string> + <string name="weather_source_title">Fonte do clima</string> <string name="weather_use_custom_location">Usar local personalizado</string> <string name="weather_geolocated">Geolocalização usando a rede</string> <string name="weather_custom_location_dialog_title">Inserir localização</string> - <string name="weather_custom_location_hint">Cidade, Estado/País</string> + <string name="weather_custom_location_hint">Cidade, estado/país</string> <string name="weather_custom_location_title">Local</string> <string name="weather_show_location_title">Exibir local</string> <string name="weather_show_timestamp_title">Exibir horário</string> <string name="weather_refresh_interval">Intervalo de atualização</string> <string name="weather_use_metric">Usar sistema métrico</string> - <string name="weather_retrieve_location_dialog_title">Não é possível definir sua localização!</string> - <string name="weather_retrieve_location_dialog_message">Geolocalização por rede está desativada.\n\nDefinir uma localização personalizada ou ativar localização por rede</string> + <string name="weather_retrieve_location_dialog_title">Impossível definir sua localização!</string> + <string name="weather_retrieve_location_dialog_message">Geolocalização por rede desativada.\n\nDefina uma localização personalizada ou ative a localização por rede</string> <string name="weather_retrieve_location_dialog_enable_button">Ativar</string> - <string name="weather_invert_lowhigh">Inverte temperaturas alta/baixa</string> + <string name="weather_invert_lowhigh">Inverte temperaturas máxima/mínima</string> <string name="weather_progress_title">Verificando localização</string> <string name="weather_alternate_icons_title">Usar ícones coloridos</string> - <string name="weather_alternate_icons_summary">Selecione para alternar entre o padrão (Colorido) ou os ícones (Brancos) alternativos</string> + <string name="weather_alternate_icons_summary">Selecione para alternar entre os ícones padrão (coloridos) ou alternativos (brancos)</string> <string name="weather_show_when_minimized_title">Exibir quando minimizado</string> - <string name="weather_show_when_minimized_summary">Exibir um resumo de informações sobre o tempo quando o widget estiver minimizado</string> + <string name="weather_show_when_minimized_summary">Exibir um resumo de informações sobre o clima quando o widget estiver minimizado</string> <string name="weather_select_location">Selecionar localização</string> <!-- Preferences - Calendar --> <string name="calendar_title">Exibir próximo evento</string> - <string name="calendars_title">Eventos dos calendários</string> - <string name="calendars_summary">Procurar por eventos nestas agendas</string> + <string name="calendars_title">Calendários de evento</string> + <string name="calendars_summary">Procurar por eventos nesses calendários</string> <string name="calendars_none_found_summary">Não há calendários encontrados</string> <string name="calendar_reminders_only_title">Apenas lembretes</string> <string name="calendar_reminders_only_summary">Exibir somente eventos com lembretes</string> @@ -167,7 +168,7 @@ <string name="font_color">Cor da fonte</string> <string name="font_color_alarm">Cor da fonte do alarme</string> <string name="font_color_timestamp">Cor da fonte do horário</string> - <string name="font_color_calendar_details">Detalhes da cor da fonte</string> + <string name="font_color_calendar_details">Cor da fonte dos detalhes</string> <!-- Preferences - Background color --> <string name="background_color">Cor de fundo</string> <string name="background_transparency">Transparência do fundo</string> @@ -198,10 +199,10 @@ <string name="holo_purple">Roxo</string> <string name="holo_orange_light">Laranja claro</string> <string name="holo_orange_dark">Laranja escuro</string> - <string name="holo_blue_bright">Azul brilhoso</string> + <string name="holo_blue_bright">Azul brilhante</string> <!-- Weather icon sets --> <string name="weather_icon_set_title">Ícones</string> - <string name="weather_icons_standard">Colorido</string> - <string name="weather_icons_monochrome">Monocromático</string> + <string name="weather_icons_standard">Coloridos</string> + <string name="weather_icons_monochrome">Monocromáticos</string> <string name="icon_set_selection_get_more">Obtenha mais\u2026</string> </resources> diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml index 4d401c5..e2b2a65 100644 --- a/res/values-pt-rPT/strings.xml +++ b/res/values-pt-rPT/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">A atualizar</string> <string name="weather_last_sync_just_now">Agora mesmo</string> <string name="weather_cannot_reach_provider">Não é possível alcançar %s de momento.</string> + <string name="weather_source_not_selected">Nenhuma fonte de meteorologia selecionada</string> + <string name="weather_tap_to_select_source">Toque para selecionar uma</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manual</string> <string name="weather_refresh_30min">30 minutos</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Ativado</string> <string name="weather_enable">Mostrar meteorologia</string> <string name="weather_source_title">Fonte de meteorologia</string> - <string name="weather_source_yahoo">Yahoo! Tempo</string> <string name="weather_use_custom_location">Usar localização personalizada</string> <string name="weather_geolocated">Geolocalização usando a rede</string> <string name="weather_custom_location_dialog_title">Insira a localização</string> diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index e99929b..e7bbc18 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Activat</string> <string name="weather_enable">Afișare meteo</string> <string name="weather_source_title">Sursă meteo</string> - <string name="weather_source_yahoo">Yahoo! Meteo</string> <string name="weather_use_custom_location">Locație personalizată</string> <string name="weather_geolocated">Localizare utilizând rețeaua</string> <string name="weather_custom_location_dialog_title">Introduceți locația</string> diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index fd19c01..8c6e7c1 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Обновление</string> <string name="weather_last_sync_just_now">Только что</string> <string name="weather_cannot_reach_provider">Сервер «%s» недоступен</string> + <string name="weather_source_not_selected">Не выбран источник погоды</string> + <string name="weather_tap_to_select_source">Нажмите, чтобы выбрать</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Вручную</string> <string name="weather_refresh_30min">30 минут</string> @@ -111,7 +113,7 @@ <!-- Preferences - Categories --> <string name="clock_category">Часы и будильник</string> <string name="weather_category">Погода</string> - <string name="calendar_category">Календарные события</string> + <string name="calendar_category">События календаря</string> <!-- Preferences - Categories --> <string name="general_category">Основные</string> <string name="display_category">Отображение</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Включено</string> <string name="weather_enable">Показывать погоду</string> <string name="weather_source_title">Сервер погоды</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Не определять автоматически</string> <string name="weather_geolocated">Местоположение по сети</string> <string name="weather_custom_location_dialog_title">Введите местоположение</string> diff --git a/res/values-si-rLK/strings.xml b/res/values-si-rLK/strings.xml index ed9c208..4835790 100644 --- a/res/values-si-rLK/strings.xml +++ b/res/values-si-rLK/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">සබලයි</string> <string name="weather_enable">කාලගුණය පෙන්වන්න</string> <string name="weather_source_title">කාලගුණ මූලාශ්රය</string> - <string name="weather_source_yahoo">යාහූ! කාලගුණය</string> <string name="weather_use_custom_location">රීසිවූ ස්ථානයක් භාවිතාකරන්න</string> <string name="weather_geolocated">භූගෝලීය ස්ථානය ජාල භාවිතයෙන්</string> <string name="weather_custom_location_dialog_title">ස්ථානය ඇතුල් කරන්න</string> diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index 3a8c8ab..debd8a1 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Povolené</string> <string name="weather_enable">Zobraziť počasie</string> <string name="weather_source_title">Zdroj počasia</string> - <string name="weather_source_yahoo">Yahoo! Počasie</string> <string name="weather_use_custom_location">Použiť vlastnú polohu</string> <string name="weather_geolocated">Lokalizované pomocou siete</string> <string name="weather_custom_location_dialog_title">Zadajte polohu</string> diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml index 06fa87d..3da3308 100644 --- a/res/values-sl/strings.xml +++ b/res/values-sl/strings.xml @@ -19,7 +19,7 @@ <!-- General strings --> <string name="unknown">Neznano</string> <string name="cancel">Prekliči</string> - <string name="loading_indicator">Nalaganje gradnika \u2026</string> + <string name="loading_indicator">Nalaganje pripomočka \u2026</string> <string name="menu_done">Končano</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and @@ -100,6 +100,8 @@ <string name="weather_refreshing">Osveževanje</string> <string name="weather_last_sync_just_now">Pravkar</string> <string name="weather_cannot_reach_provider">%s trenutno ni mogoče doseči</string> + <string name="weather_source_not_selected">Vir za vreme ni izbran</string> + <string name="weather_tap_to_select_source">Tapnite za izbiro</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Ročno</string> <string name="weather_refresh_30min">30 minut</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Omogočeno</string> <string name="weather_enable">Prikaži vreme</string> <string name="weather_source_title">Vremenski vir</string> - <string name="weather_source_yahoo">Vreme Yahoo!</string> <string name="weather_use_custom_location">Uporabi lokacijo po meri</string> <string name="weather_geolocated">Najdeno z uporabo omrežja</string> <string name="weather_custom_location_dialog_title">Vnesite lokacijo</string> @@ -145,7 +146,7 @@ <string name="weather_alternate_icons_title">Uporabi obarvane ikone</string> <string name="weather_alternate_icons_summary">Izberite, da preklopite med privzeto barvo in nadomestnimi belimi ikonami</string> <string name="weather_show_when_minimized_title">Prikaži, ko je skrčeno</string> - <string name="weather_show_when_minimized_summary">Prikaži povzetek o vremenu, ko je gradnik skrčen</string> + <string name="weather_show_when_minimized_summary">Prikaži povzetek o vremenu, ko je pripomoček skrčen</string> <string name="weather_select_location">Izberite lokacijo</string> <!-- Preferences - Calendar --> <string name="calendar_title">Prikaži naslednji dogodek</string> diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml index bdd9f20..054ee06 100644 --- a/res/values-sr/strings.xml +++ b/res/values-sr/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Освежавање</string> <string name="weather_last_sync_just_now">Управо сада</string> <string name="weather_cannot_reach_provider">Не може да се достигне %s тренутно</string> + <string name="weather_source_not_selected">Нема изабраног добављача прогнозе</string> + <string name="weather_tap_to_select_source">Додирни да изабереш једно</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Ручно</string> <string name="weather_refresh_30min">30 минута</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Омогућено</string> <string name="weather_enable">Прикажи време</string> <string name="weather_source_title">Извор времена</string> - <string name="weather_source_yahoo">Yahoo! Време</string> <string name="weather_use_custom_location">Користи прилагођену локацију</string> <string name="weather_geolocated">Лоцирање коришћењем мреже</string> <string name="weather_custom_location_dialog_title">Унеси локацију</string> diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index 0bb6471..b5e8f8c 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Aktiverad</string> <string name="weather_enable">Visa väder</string> <string name="weather_source_title">Väderkälla</string> - <string name="weather_source_yahoo">Yahoo! Väder</string> <string name="weather_use_custom_location">Använd anpassad plats</string> <string name="weather_geolocated">Geopositionerad använd nätverk</string> <string name="weather_custom_location_dialog_title">Ange plats</string> diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta-rIN/strings.xml index bcbe820..67a532c 100644 --- a/res/values-ta-rIN/strings.xml +++ b/res/values-ta-rIN/strings.xml @@ -17,32 +17,190 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> + <string name="unknown">தெரியாதது</string> + <string name="cancel">ரத்துசெய்</string> + <string name="loading_indicator">விட்ஜெட் லோடாகிறது\u2026</string> + <string name="menu_done">முடிந்தது</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> + <string name="weather_0">டொர்னாடோ</string> + <string name="weather_1">வெப்பமண்டல புயல்</string> + <string name="weather_2">சூறாவளி</string> + <string name="weather_3">கடுமையான இடி மின்னலுடன் கூடிய மழை</string> + <string name="weather_4">இடி மின்னலுடன் கூடிய மழை</string> + <string name="weather_5">கலப்பு மழை மற்றும் பனி</string> + <string name="weather_6">கலப்பு மழை மற்றும் ஆலங்கட்டி மழை</string> + <string name="weather_7">கலப்பு பனி மற்றும் ஆலங்கட்டி மழை</string> + <string name="weather_8">உறையவைக்கும் தூறல்</string> + <string name="weather_9">தூறல்</string> + <string name="weather_10">உறை மழை</string> + <string name="weather_11">மழைத்தூறல்</string> + <string name="weather_12">மழைத்தூறல்</string> + <string name="weather_13">பனிப்பொழிவு</string> + <string name="weather_14">லேசான பனித் தூறல்கள்</string> + <string name="weather_15">காற்றுடன் பனிப்பொழிவு</string> + <string name="weather_16">பனி</string> + <string name="weather_17">ஹெயில்</string> + <string name="weather_18">பனிப்பொழிவு</string> + <string name="weather_19">தூசி</string> + <string name="weather_20">ஃபாகி</string> + <string name="weather_21">மூட்டம்</string> + <string name="weather_22">புகைமண்டலம்</string> + <string name="weather_23">பிளஸ்டரி</string> + <string name="weather_24">காற்று</string> + <string name="weather_25">குளிர்ச்சி</string> + <string name="weather_26">மேகமூட்டம்</string> <!-- Night --> + <string name="weather_27">பெரும்பாளும் மேஅமூட்டம்</string> <!-- Day --> + <string name="weather_28">பெரும்பாளும் மேஅமூட்டம்</string> <!-- Night --> + <string name="weather_29">ஒரளவு மேகமூட்டம்</string> <!-- Day --> + <string name="weather_30">ஒரளவு மேகமூட்டம்</string> <!-- Night --> + <string name="weather_31">அழி</string> + <string name="weather_32">வெயில்</string> <!-- Night --> + <string name="weather_33">இயல்பான</string> <!-- Day --> + <string name="weather_34">இயல்பான</string> + <string name="weather_35">கலப்பு மழை மற்றும் ஆலங்கட்டி</string> + <string name="weather_36">உஷ்ணம்</string> + <string name="weather_37">ஆங்காங்கே இடியுடன்கூடிய மழை</string> + <string name="weather_38">பரவலான இடிமழை</string> + <string name="weather_39">பரவலான இடிமழை</string> + <string name="weather_40">பரவலான தூறல்</string> + <string name="weather_41">கடும் பனி</string> + <string name="weather_42">பரவலான பனிப்பொழிவு</string> + <string name="weather_43">கடும் பனி</string> + <string name="weather_44">ஒரளவு மேகமூட்டம்</string> + <string name="weather_45">இடியுடன்கூடிய மழை</string> + <string name="weather_46">பனிப்பொழிவு</string> + <string name="weather_47">ஆங்காங்கே இடியுடன்கூடிய மழை</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> + <string name="weather_kph">kph</string> + <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> + <string name="weather_N">N</string> + <string name="weather_NE">NE</string> + <string name="weather_E">E</string> + <string name="weather_SE">SE</string> + <string name="weather_S">S</string> + <string name="weather_SW">SW</string> + <string name="weather_W">W</string> + <string name="weather_NW">NW</string> <!-- Weather - Error messages --> + <string name="weather_no_data">தரவு இல்லை</string> + <string name="weather_tap_to_refresh">புதுப்பிக்க தட்டு</string> + <string name="weather_refreshing">புதுப்பிக்கிறது</string> + <string name="weather_last_sync_just_now">சற்றுமுன்</string> + <string name="weather_cannot_reach_provider">தற்போது %s அடைய முடியாது</string> <!-- Weather - Update frequency --> + <string name="weather_refresh_manual">கைமுறை</string> + <string name="weather_refresh_30min">30 நிமிடங்கள்</string> + <string name="weather_refresh_60min">60 நிமிடங்கள்</string> + <string name="weather_refresh_2hrs">2 மணிநேரம்</string> + <string name="weather_refresh_4hrs">4 மணிநேரம்</string> + <string name="weather_refresh_6hrs">6 மணிநேரம்</string> + <string name="weather_refresh_8hrs">8 மணிநேரம்</string> <!-- Preferences - Categories --> + <string name="clock_category">கடியாரமும் அலாரமும்</string> + <string name="weather_category">வானிலை மன்றம்</string> + <string name="calendar_category">நாள்காட்டி நிகழ்வுகள்</string> <!-- Preferences - Categories --> + <string name="general_category">பொது</string> + <string name="display_category">டிஸ்பிளே</string> <!-- Preferences - Clock --> + <string name="use_digital_clock_title">டிஜிட்டல் கடிகாரம் பயன்படுத்துக</string> + <string name="use_digital_clock_summary">டிஜிட்டல் மற்றும் அனலாக் கடிகாரங்களுக்கு இடையே நிலைமாற்றத்தை தேர்வுசெய்</string> + <string name="clock_font_title">போல்டு மணிநேரங்கள்</string> + <string name="clock_font_minutes_title">போல்டு நிமிடங்கள்</string> + <string name="clock_font_date_title">போல்டு தேதி மற்றும் அலாரம்</string> + <string name="show_alarm_title">அடுத்த அலாரத்தைக் காட்டு</string> + <string name="clock_am_pm_title">AM/PM அறிவிப்பைக் காட்டு</string> <!-- Preferences - Weather --> + <string name="weather_enabled">இயக்கப்பட்டவை</string> + <string name="weather_enable">வானிலையை காண்பி</string> + <string name="weather_source_title">வானிலை ஆதாரம்</string> + <string name="weather_use_custom_location">தனிப்பயனாக்கப்பட்ட இடத்தைப் பயன்படுத்து</string> + <string name="weather_geolocated">பிணையத்தை பயன்படுத்தி புவியல் இடம்கண்டறியப்பட்டது</string> + <string name="weather_custom_location_dialog_title">இருப்பிடத்தை உள்ளிடு</string> + <string name="weather_custom_location_hint">நகரம், மாநிலம்/நாடு</string> + <string name="weather_custom_location_title">இருப்பிடம்</string> + <string name="weather_show_location_title">இருப்பிடத்தைக் காண்பி</string> + <string name="weather_show_timestamp_title">நேரமுத்திரையை காண்பி</string> + <string name="weather_refresh_interval">இடைவெளியை புதுப்பி</string> + <string name="weather_use_metric">மெட்ரிக்கைப் பயன்படுத்து</string> + <string name="weather_retrieve_location_dialog_title">இருப்பிடத்தை மீட்டெடுக்க முடியவில்லை!</string> + <string name="weather_retrieve_location_dialog_message">பிணைய ஜியோலொகேசன் முடக்கப்பட்டது.\n\n ஒரு தனிப்பயனாக்கப்பட்ட இருப்பிடடத்தை அமை அல்லது பிணைய இருப்பிடத்தை செயல்படுத்து</string> + <string name="weather_retrieve_location_dialog_enable_button">இயக்கு</string> + <string name="weather_invert_lowhigh">குறைந்த/உயர்ந்த தட்பவெப்பத்தை புரட்டு</string> + <string name="weather_progress_title">இருப்பிடத்தை சரிபார்</string> + <string name="weather_alternate_icons_title">வண்ண படவுருக்களைப் பயன்படுத்து</string> + <string name="weather_alternate_icons_summary">இயல்புநிலை(வண்ணம்) மற்றும் மாற்று (வெள்ளை) படவுருக்களுக்கு இடையே நிலைமாற்றத்தை தேர்வுசெய்</string> + <string name="weather_show_when_minimized_title">சிறிதாக்கப்படும்போது காண்பி</string> + <string name="weather_show_when_minimized_summary">விட்ஜெட் சிறிதாக்கப்படும்போது சுருக்க வானிலையைக் காண்பி</string> + <string name="weather_select_location">இருப்பிடத்தை தேர்வுசெய்</string> <!-- Preferences - Calendar --> + <string name="calendar_title">அடுத்த நிகழ்வை காண்பி</string> + <string name="calendars_title">நிகழ்வு நாள்காட்டிகள்</string> + <string name="calendars_summary">இந்த நாள்காட்டிகளுக்கான நிகழ்வுகளைக் காண்பி</string> + <string name="calendars_none_found_summary">காலெண்டர்கள் எதுவும் கண்டறியப்படவில்லை</string> + <string name="calendar_reminders_only_title">நினைவூட்டிகள் மட்டும்</string> + <string name="calendar_reminders_only_summary">நினைவூட்டிகள் உடைய நிகழ்வுகளை மட்டும் காண்பி</string> + <string name="calendar_hide_allday_title">நாள் முழுவதுமான நிகழ்வுகளை மறை</string> + <string name="calendar_icon_title">நாள்காட்டி படவுரு</string> + <string name="calendar_lookahead_title">நிகழ்வை முன்னதாகக்காண்</string> + <string name="calendar_show_location_title">நிகழ்வு இடம்</string> + <string name="calendar_show_description_title">நிகழ்வு விளக்கம்</string> + <string name="calendar_upcoming_events_category">வரவிருக்கும் நிகழ்வுகள்</string> + <string name="calendar_highlight_upcoming_events_title">நிகழ்வுகளை தனிப்படுத்து</string> + <string name="calendar_highlight_upcoming_events_summary">நடப்பு நாளின் நிகழ்வுகளை, மாலை 8 மணிக்கு மேலும், அடுத்த நாள் நிகழ்வுகளையும் தனிப்படுத்து</string> + <string name="calendar_highlight_upcoming_events_bold">தடித்த எழுத்துரு</string> <!-- Preferences - Font colors --> + <string name="font_color">எழுத்துரு வண்ணம்</string> + <string name="font_color_alarm">அலாரம் எழுத்துரு வண்ணம்</string> + <string name="font_color_timestamp">நேரமுத்திரை எழுத்துரு வண்ணம்</string> + <string name="font_color_calendar_details">எழுத்துரு வண்ணங்களை விவரிக்கிறது</string> <!-- Preferences - Background color --> + <string name="background_color">பின்புல வண்ணம்</string> + <string name="background_transparency">பின்னணி கண்ணாடித்தன்மை</string> <!-- Calendar - Lookahead --> + <string name="calendar_lookahead_3hrs">3 மணிநேரம்</string> + <string name="calendar_lookahead_6hrs">6 மணிநேரம்</string> + <string name="calendar_lookahead_12hrs">12 மணிநேரம்</string> + <string name="calendar_lookahead_today">இன்று</string> + <string name="calendar_lookahead_1day">1 நாள்</string> + <string name="calendar_lookahead_3days">3 நாட்கள்</string> + <string name="calendar_lookahead_1wk">1 வாரம்</string> + <string name="calendar_lookahead_2wks">2 வாரங்கள்</string> + <string name="calendar_lookahead_4wks">4 வாரங்கள்</string> <!-- Calendar - Event metadata --> + <string name="calendar_metadata_none">காண்பிக்காதே</string> + <string name="calendar_metadata_first_line">உங்கள் முதல் வரி</string> + <string name="calendar_metadata_all">அனைத்தையும் காண்பி</string> <!-- Font colors --> + <string name="white">வெள்ளை</string> + <string name="grey">சாம்பல்</string> + <string name="black">கருப்பு</string> + <string name="holo_blue_light">லேசான நீலம்</string> + <string name="holo_green_light">லேசான பச்சை</string> + <string name="holo_red_light">லேசான சிவப்பு</string> + <string name="holo_blue_dark">கருநீலம்</string> + <string name="holo_green_dark">கரும்பச்சை</string> + <string name="holo_red_dark">கருஞ்சிவப்பு</string> + <string name="holo_purple">ஊதா</string> + <string name="holo_orange_light">லேசான ஆரஞ்சு</string> + <string name="holo_orange_dark">கரும் ஆரஞ்சு</string> + <string name="holo_blue_bright">பிரகாசமான நீலம்</string> <!-- Weather icon sets --> + <string name="weather_icon_set_title">படவுரு தொகுப்பு</string> + <string name="weather_icons_standard">வண்ணமுடையது</string> + <string name="weather_icons_monochrome">ஒற்றைநிறம்</string> + <string name="icon_set_selection_get_more">மேலும் பெறுக\u2026</string> </resources> diff --git a/res/values-te-rIN/strings.xml b/res/values-te-rIN/strings.xml index bcbe820..f14630d 100644 --- a/res/values-te-rIN/strings.xml +++ b/res/values-te-rIN/strings.xml @@ -17,32 +17,190 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- General strings --> + <string name="unknown">తెలియదు</string> + <string name="cancel">రద్దు చేయి</string> + <string name="loading_indicator">విడ్జెట్ లోడ్ చేయబడుతోంది\u2026</string> + <string name="menu_done">పూర్తయింది</string> <!-- Formating strings for widget clock --> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. We need to support both --> <!-- Weather - Weather codes --> + <string name="weather_0">టోర్నడో (సుడిగాలి)</string> + <string name="weather_1">ఉష్ణమండలీయ తుఫాను</string> + <string name="weather_2">గాలివాన</string> + <string name="weather_3">తీవ్రమైన ఉరుములతో కూడిన గాలివాన</string> + <string name="weather_4">ఉరుములతో కూడిన గాలివాన</string> + <string name="weather_5">వర్షం మరియు మంచు కలగలిసి</string> + <string name="weather_6">వర్షం మరియు వడగండ్లు కలిసి</string> + <string name="weather_7">మంచు మరియు వడగండ్లు కలిసి</string> + <string name="weather_8">చల్లటి చినుకులు</string> + <string name="weather_9">చినుకులు</string> + <string name="weather_10">చల్లటి వర్షం</string> + <string name="weather_11">జల్లులు</string> + <string name="weather_12">జల్లులు</string> + <string name="weather_13">మంచు గాలులు</string> + <string name="weather_14">తేలికపాటి మంచు జల్లులు</string> + <string name="weather_15">వెదజల్లే మంచు</string> + <string name="weather_16">మంచు</string> + <string name="weather_17">వడగండ్ల వాన</string> + <string name="weather_18">మంచు వాన</string> + <string name="weather_19">దుమ్ము</string> + <string name="weather_20">పొగమంచు</string> + <string name="weather_21">మబ్బుగా</string> + <string name="weather_22">పొగతో</string> + <string name="weather_23">హోరుగాలి</string> + <string name="weather_24">గాలులు</string> + <string name="weather_25">కోల్డ్</string> + <string name="weather_26">మేఘావృతం</string> <!-- Night --> + <string name="weather_27">చాలావరకు మేఘావృతం</string> <!-- Day --> + <string name="weather_28">చాలావరకు మేఘావృతం</string> <!-- Night --> + <string name="weather_29">పాక్షికంగా మేఘావృతం</string> <!-- Day --> + <string name="weather_30">పాక్షికంగా మేఘావృతం</string> <!-- Night --> + <string name="weather_31">క్లియర్ చేయండి</string> + <string name="weather_32">ఎండగా</string> <!-- Night --> + <string name="weather_33">అనుకూలంగా</string> <!-- Day --> + <string name="weather_34">అనుకూలంగా</string> + <string name="weather_35">వర్షం మరియు వడగండ్లు కలిసి</string> + <string name="weather_36">వేడిగా</string> + <string name="weather_37">ఎక్కడన్నా తుఫాను</string> + <string name="weather_38">చెల్లాచెదరైన తుఫాను</string> + <string name="weather_39">చెల్లాచెదరైన తుఫాను</string> + <string name="weather_40">చెల్లాచెదరైన జల్లులు</string> + <string name="weather_41">తీవ్రమైన మంచు</string> + <string name="weather_42">చెల్లాచెదరైన మంచు జల్లులు</string> + <string name="weather_43">తీవ్రమైన మంచు</string> + <string name="weather_44">పాక్షికంగా మేఘావృతం</string> + <string name="weather_45">ఉరుములతో కూడిన జల్లులు</string> + <string name="weather_46">మంచు జల్లులు</string> + <string name="weather_47">ఎక్కడన్నా ఉరుములతో కూడిన జల్లులు</string> <!-- Forecast unavailable --> <!-- Weather - Speed units --> + <string name="weather_kph">kph</string> + <string name="weather_mph">mph</string> <!-- Weather - Wind directions --> + <string name="weather_N">N</string> + <string name="weather_NE">NE</string> + <string name="weather_E">E</string> + <string name="weather_SE">SE</string> + <string name="weather_S">S</string> + <string name="weather_SW">SW</string> + <string name="weather_W">W</string> + <string name="weather_NW">NW</string> <!-- Weather - Error messages --> + <string name="weather_no_data">డేటా లేదు</string> + <string name="weather_tap_to_refresh">పునశ్చరించేందుకు ట్యాప్ చేయుము</string> + <string name="weather_refreshing">పునశ్చరణ జరుగుతోంది</string> + <string name="weather_last_sync_just_now">ఇప్పుడే</string> + <string name="weather_cannot_reach_provider">ఈ క్షణాన %s చేరుకోలేకపోయింది</string> <!-- Weather - Update frequency --> + <string name="weather_refresh_manual">మాన్యువల్</string> + <string name="weather_refresh_30min">30 నిమిషాలు</string> + <string name="weather_refresh_60min">60 నిమిషాలు</string> + <string name="weather_refresh_2hrs">2 గంటలు</string> + <string name="weather_refresh_4hrs">4 గంటలు</string> + <string name="weather_refresh_6hrs">6 గంటలు</string> + <string name="weather_refresh_8hrs">8 గంటలు</string> <!-- Preferences - Categories --> + <string name="clock_category">గడియారం మరియు అలారం</string> + <string name="weather_category">వాతావరణ ప్యానల్</string> + <string name="calendar_category">క్యాలెండర్ ఈవెంట్లు</string> <!-- Preferences - Categories --> + <string name="general_category">సాధారణం</string> + <string name="display_category">ప్రదర్శన</string> <!-- Preferences - Clock --> + <string name="use_digital_clock_title">డిజిటల్ గడియారాన్ని ఉపయోగించుము</string> + <string name="use_digital_clock_summary">డిజిటల్ మరియు అనలాగ్ గడియారాల మధ్య ద్విక్రియం కావడాన్ని ఎంచుకొనుము</string> + <string name="clock_font_title">లావు అక్షరాలలో గంటలు</string> + <string name="clock_font_minutes_title">లావు అక్షరాలలో నిమిషాలు</string> + <string name="clock_font_date_title">లావు అక్షరాలలో తేదీ మరియు అలారం</string> + <string name="show_alarm_title">తదుపరి అలారంను చూపుము</string> + <string name="clock_am_pm_title">AM/PM సూచికను చూపుము</string> <!-- Preferences - Weather --> + <string name="weather_enabled">ప్రారంభించబడినవి</string> + <string name="weather_enable">వాతావరణాన్ని ప్రదర్శించుము</string> + <string name="weather_source_title">వాతావరణ వనరు</string> + <string name="weather_use_custom_location">అనుకూల ప్రదేశాన్ని ఉపయోగించుము</string> + <string name="weather_geolocated">నెట్వర్కును ఉపయోగించి భౌగోళికంగా</string> + <string name="weather_custom_location_dialog_title">ప్రదేశాన్ని ఎంటర్ చేయుము</string> + <string name="weather_custom_location_hint">నగరం, రాష్ట్రం/దేశం</string> + <string name="weather_custom_location_title">స్థానం</string> + <string name="weather_show_location_title">ప్రదేశాన్ని చూపుము</string> + <string name="weather_show_timestamp_title">సమయ ముద్రను చూపుము</string> + <string name="weather_refresh_interval">విరామాన్ని నవీకరించుము</string> + <string name="weather_use_metric">మెట్రికును ఉపయోగించుము</string> + <string name="weather_retrieve_location_dialog_title">స్థానాన్ని తిరిగిపొందడం సాధ్యపడలేదు!</string> + <string name="weather_retrieve_location_dialog_message">నెట్వర్క్ యొక్క భౌగోళిక స్థానం అచేతనపరచబడింది.\n\nఒక అనుకూల స్థానాన్ని అమర్చండి లేదా నెట్వర్క్ స్థానాన్ని చేతనపరుచుము</string> + <string name="weather_retrieve_location_dialog_enable_button">ప్రారంభించు</string> + <string name="weather_invert_lowhigh">తక్కువ/ఎక్కువ ఉష్ణోగ్రతలను విలోమం చేయుము</string> + <string name="weather_progress_title">స్థానం ధృవీకరించబడుతోంది</string> + <string name="weather_alternate_icons_title">రంగు చిహ్నాలను ఉపయోగించుము</string> + <string name="weather_alternate_icons_summary">స్వయంసిద్ధ (రంగు) మరియు ప్రత్యామ్నాయ (తెలుపు) చిహ్నాల మధ్య ద్విక్రియం అయ్యేందుకు ఎంచుకొనుము</string> + <string name="weather_show_when_minimized_title">కనిష్ఠీకరించబడినప్పుడు చూపుము</string> + <string name="weather_show_when_minimized_summary">విడ్జెట్ కనిష్ఠీకరించబడినప్పుడు వాతావరణ సమాచార సారాంశాన్ని ప్రదర్శించుము</string> + <string name="weather_select_location">స్థానాన్ని ఎంచుకొనుము</string> <!-- Preferences - Calendar --> + <string name="calendar_title">తదుపరి ఈవెంటును ప్రదర్శించుము</string> + <string name="calendars_title">ఈవెంట్ క్యాలెండర్లు</string> + <string name="calendars_summary">ఈ క్యాలెండర్ల నుండి ఈవెంట్లను కనుగొనుము</string> + <string name="calendars_none_found_summary">క్యాలెండర్లు దొరకలేదు</string> + <string name="calendar_reminders_only_title">జ్ఞాపికలు మాత్రమే</string> + <string name="calendar_reminders_only_summary">జ్ఞాపికలతో ఉన్న ఈవెంట్లను మాత్రమే చూపుము</string> + <string name="calendar_hide_allday_title">రోజంతటికీ ఉన్న ఈవెంట్లను దాయుము</string> + <string name="calendar_icon_title">క్యాలెండర్ చిహ్నం</string> + <string name="calendar_lookahead_title">ఈవెంట్ తయారీ</string> + <string name="calendar_show_location_title">ఈవెంట్ స్థానం</string> + <string name="calendar_show_description_title">ఈవెంట్ వర్ణన</string> + <string name="calendar_upcoming_events_category">రాబోయే ఈవెంట్లు</string> + <string name="calendar_highlight_upcoming_events_title">ప్రధానమైన ఈవెంట్లు</string> + <string name="calendar_highlight_upcoming_events_summary">ప్రస్తుత రోజు ఈవెంట్లు, రాత్రి 8 గంటల తరువాత ఉన్నవి, అలాగే మరుసటి రోజు ఈవెంట్లను హైలైట్ చేయుము</string> + <string name="calendar_highlight_upcoming_events_bold">లావు అక్షరాకృతి</string> <!-- Preferences - Font colors --> + <string name="font_color">అక్షరాకృతి వర్ణం</string> + <string name="font_color_alarm">అలారం అక్షరాకృతి వర్ణం</string> + <string name="font_color_timestamp">సమయ ముద్ర అక్షరాకృతి వర్ణం</string> + <string name="font_color_calendar_details">అక్షరాకృతి వర్ణాలను వివరిస్తుంది</string> <!-- Preferences - Background color --> + <string name="background_color">నేపథ్య రంగు</string> + <string name="background_transparency">నేపధ్య పారదర్శకత</string> <!-- Calendar - Lookahead --> + <string name="calendar_lookahead_3hrs">3 గంటలు</string> + <string name="calendar_lookahead_6hrs">6 గంటలు</string> + <string name="calendar_lookahead_12hrs">12 గంటలు</string> + <string name="calendar_lookahead_today">నేడు</string> + <string name="calendar_lookahead_1day">1 రోజు</string> + <string name="calendar_lookahead_3days">3 రోజులు</string> + <string name="calendar_lookahead_1wk">1 వారం</string> + <string name="calendar_lookahead_2wks">2 వారాలు</string> + <string name="calendar_lookahead_4wks">4 వారాలు</string> <!-- Calendar - Event metadata --> + <string name="calendar_metadata_none">చూపవద్దు</string> + <string name="calendar_metadata_first_line">మొదటి పంక్తిని చూపుము</string> + <string name="calendar_metadata_all">అన్నీ చూపించు</string> <!-- Font colors --> + <string name="white">తెలుపు రంగు</string> + <string name="grey">బూడిద రంగు</string> + <string name="black">నలుపు రంగు</string> + <string name="holo_blue_light">లేత నీలం</string> + <string name="holo_green_light">లేత ఆకుపచ్చ</string> + <string name="holo_red_light">లేత ఎరుపు</string> + <string name="holo_blue_dark">ముదురు నీలం</string> + <string name="holo_green_dark">ముదురు ఆకుపచ్చ</string> + <string name="holo_red_dark">ముదురు ఎరుపు</string> + <string name="holo_purple">వంగ రంగు</string> + <string name="holo_orange_light">లేత నారింజ</string> + <string name="holo_orange_dark">ముదురు నారింజ</string> + <string name="holo_blue_bright">ప్రకాశవంతమైన నీలం</string> <!-- Weather icon sets --> + <string name="weather_icon_set_title">చిహ్నం</string> + <string name="weather_icons_standard">వర్ణ భరిత</string> + <string name="weather_icons_monochrome">ఏకవర్ణ</string> + <string name="icon_set_selection_get_more">ఎక్కువ పొందండి\u2026</string> </resources> diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml index e507172..9823fe6 100644 --- a/res/values-th/strings.xml +++ b/res/values-th/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">กำลังรีเฟรช</string> <string name="weather_last_sync_just_now">เมื่อเร็ว ๆ นี้</string> <string name="weather_cannot_reach_provider">ไม่สามารถเข้าถึง %s ได้ในขณะนี้</string> + <string name="weather_source_not_selected">ไม่มีแหล่งข้อมูลอากาศที่ถูกเลือก</string> + <string name="weather_tap_to_select_source">แตะเพื่อเลือกแหล่ง</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">ด้วยตัวเอง</string> <string name="weather_refresh_30min">30 นาที</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">เปิด</string> <string name="weather_enable">แสดงสภาพอากาศ</string> <string name="weather_source_title">แหล่งที่มาของสภาพอากาศ</string> - <string name="weather_source_yahoo">พยากรณ์อากาศของ Yahoo!</string> <string name="weather_use_custom_location">ใช้ตำแหน่งที่ตั้งที่กำหนดเอง</string> <string name="weather_geolocated">หาตำแหน่งโดยใช้เครือข่าย</string> <string name="weather_custom_location_dialog_title">ใส่ตำแหน่งที่ตั้ง</string> @@ -151,6 +152,7 @@ <string name="calendar_title">แสดงกิจกรรมถัดไป</string> <string name="calendars_title">ปฏิทินกิจกรรม</string> <string name="calendars_summary">ค้นหากิจกรรมจากปฏิทินเหล่านี้</string> + <string name="calendars_none_found_summary">ไม่พบปฏิทิน</string> <string name="calendar_reminders_only_title">การแจ้งเตือนเท่านั้น</string> <string name="calendar_reminders_only_summary">แสดงเฉพาะกิจกรรมที่มีการแจ้งเตือน</string> <string name="calendar_hide_allday_title">ซ่อนกิจกรรมทั้งวัน</string> diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index ef76bb3..5e50833 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Yenileniyor</string> <string name="weather_last_sync_just_now">Az önce</string> <string name="weather_cannot_reach_provider">%s şu anda ulaşılamıyor</string> + <string name="weather_source_not_selected">Hiçbir hava kaynağı seçilmedi</string> + <string name="weather_tap_to_select_source">Birini seçmek için dokunun</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Elle</string> <string name="weather_refresh_30min">30 dakika</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Etkin</string> <string name="weather_enable">Hava durumunu göster</string> <string name="weather_source_title">Hava durumu kaynağı</string> - <string name="weather_source_yahoo">Yahoo! Havadurumu</string> <string name="weather_use_custom_location">Özel konum kullan</string> <string name="weather_geolocated">Ağ kullanılarak coğrafi konumlandırıldı</string> <string name="weather_custom_location_dialog_title">Konum girin</string> @@ -151,6 +152,7 @@ <string name="calendar_title">Sonraki etkinliği göster</string> <string name="calendars_title">Etkinlik takvimleri</string> <string name="calendars_summary">Bu takvimlerden olayları bul</string> + <string name="calendars_none_found_summary">Hiçbir takvim bulunamadı</string> <string name="calendar_reminders_only_title">Sadece hatırlatıcılar</string> <string name="calendar_reminders_only_summary">Sadece hatırlatıcıları olan etkinlikleri göster</string> <string name="calendar_hide_allday_title">Gün boyu süren olayları gizle</string> diff --git a/res/values-ug/strings.xml b/res/values-ug/strings.xml index 92e3b5f..4a78852 100644 --- a/res/values-ug/strings.xml +++ b/res/values-ug/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">قوزغىتىلغان</string> <string name="weather_enable">ھاۋارايى كۆرسەت</string> <string name="weather_source_title">ھاۋارايى مەنبەسى</string> - <string name="weather_source_yahoo">Yahoo! ھاۋارايى</string> <string name="weather_use_custom_location">ئىختىيارىي ئورۇن ئىشلەت</string> <string name="weather_geolocated">جۇغراپىيەلىك ئورۇنغا تورنى ئىشلىتىدۇ</string> <string name="weather_custom_location_dialog_title">ئورۇننى كىرگۈزۈڭ</string> @@ -151,6 +150,7 @@ <string name="calendar_title">كېيىنكى پائالىيەتنى كۆرسەت</string> <string name="calendars_title">پائالىيەت يىلنامەسى</string> <string name="calendars_summary">بۇ يىلنامەدىن پائالىيەت ئىزدە</string> + <string name="calendars_none_found_summary">ھېچقانداق كالېندار بايقىمىدى</string> <string name="calendar_reminders_only_title">ئەسكەرتىشلا</string> <string name="calendar_reminders_only_summary">ئەسكەرتىشى بار پائالىيەتنىلا كۆرسەت</string> <string name="calendar_hide_allday_title">پۈتۈن كۈنلۈك پائالىيەتنى يوشۇر</string> @@ -168,6 +168,8 @@ <string name="font_color_timestamp">ۋاقىت تامغىسىنىڭ خەت رەڭگى</string> <string name="font_color_calendar_details">تەپسىلات خەت رەڭگى</string> <!-- Preferences - Background color --> + <string name="background_color">تەگلىك رەڭگى</string> + <string name="background_transparency">ئارقا كۆرۈنۈش سۈزۈكلىكى</string> <!-- Calendar - Lookahead --> <string name="calendar_lookahead_3hrs">3 سائەت</string> <string name="calendar_lookahead_6hrs">6 سائەت</string> diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index 3952646..14df10d 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">Увімкнено</string> <string name="weather_enable">Погода показується</string> <string name="weather_source_title">Джерело погоди</string> - <string name="weather_source_yahoo">Yahoo! Погода</string> <string name="weather_use_custom_location">Не визначати автоматично</string> <string name="weather_geolocated">Місцезнаходження по мережі</string> <string name="weather_custom_location_dialog_title">Введіть місцезнаходження</string> diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index 3355b64..9c6af70 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">Đang làm mới</string> <string name="weather_last_sync_just_now">Vừa mới đây</string> <string name="weather_cannot_reach_provider">Không truy cập được %s lúc này</string> + <string name="weather_source_not_selected">Không có nguồn thời tiết nào được chọn</string> + <string name="weather_tap_to_select_source">Chạm để chọn một</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Thủ công</string> <string name="weather_refresh_30min">30 phút</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">Đã bật</string> <string name="weather_enable">Hiển thị thời tiết</string> <string name="weather_source_title">Nguồn dữ liệu thời tiết</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> <string name="weather_use_custom_location">Sử dụng vị trí tùy chỉnh</string> <string name="weather_geolocated">Định vị địa lý bằng mạng</string> <string name="weather_custom_location_dialog_title">Nhập vị trí</string> @@ -151,6 +152,7 @@ <string name="calendar_title">Hiển thị sự kiện tiếp theo</string> <string name="calendars_title">Sự kiện lịch</string> <string name="calendars_summary">Tìm sự kiện từ các lịch này</string> + <string name="calendars_none_found_summary">Không tìm thấy lịch</string> <string name="calendar_reminders_only_title">Chỉ có nhắc nhở</string> <string name="calendar_reminders_only_summary">Chỉ hiển thị sự kiện có nhắc nhở</string> <string name="calendar_hide_allday_title">Ẩn sự kiện diễn ra cả ngày</string> diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 2274bb8..39ebe80 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -100,6 +100,8 @@ <string name="weather_refreshing">正在刷新</string> <string name="weather_last_sync_just_now">刚刚</string> <string name="weather_cannot_reach_provider">暂时无法访问 %s</string> + <string name="weather_source_not_selected">没有选择天气源</string> + <string name="weather_tap_to_select_source">点击以选择一个</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">手动</string> <string name="weather_refresh_30min">30 分钟</string> @@ -127,7 +129,6 @@ <string name="weather_enabled">已启用</string> <string name="weather_enable">显示天气</string> <string name="weather_source_title">天气来源</string> - <string name="weather_source_yahoo">雅虎天气</string> <string name="weather_use_custom_location">使用自定义的位置</string> <string name="weather_geolocated">使用网络定位</string> <string name="weather_custom_location_dialog_title">输入位置</string> diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml index 955a07e..252c5b4 100644 --- a/res/values-zh-rHK/strings.xml +++ b/res/values-zh-rHK/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">已啟用</string> <string name="weather_enable">顯示天氣</string> <string name="weather_source_title">天氣來源</string> - <string name="weather_source_yahoo">Yahoo! 天氣</string> <string name="weather_use_custom_location">使用自訂位置</string> <string name="weather_geolocated">使用網絡的地理定位</string> <string name="weather_custom_location_dialog_title">輸入位置</string> diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index 6444ba3..cb6d75a 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -127,7 +127,6 @@ <string name="weather_enabled">已啟用</string> <string name="weather_enable">顯示天氣</string> <string name="weather_source_title">天氣來源</string> - <string name="weather_source_yahoo">Yahoo! 氣象</string> <string name="weather_use_custom_location">使用自訂位置</string> <string name="weather_geolocated">使用網路定位</string> <string name="weather_custom_location_dialog_title">輸入位置</string> diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 9c5598d..eff4b47 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -106,14 +106,4 @@ <item>#ffaa66cc</item> </string-array> - <string-array name="weather_source_entries" translatable="false"> - <item>@string/weather_source_yahoo</item> - <item>@string/weather_source_openweathermap</item> - </string-array> - - <string-array name="weather_source_values" translatable="false"> - <item>yahoo</item> - <item>openweathermap</item> - </string-array> - </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index a0b2465..568c47e 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -53,4 +53,5 @@ <dimen name="forecast_dialog_width">340dp</dimen> <dimen name="forecast_icon_size">36dp</dimen> + <dimen name="forecast_item_padding_side">10dp</dimen> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 4a5bdbe..2d02171 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -26,6 +26,7 @@ <string name="widget_12_hours_format_h" translatable="false">h</string> <string name="widget_12_hours_format_no_ampm_m" translatable="false">:mm</string> <string name="widget_12_hours_format_m" translatable="false">:mm<font size="15">aa</font></string> + <string name="widget_12_hours_format_ampm" translatable="false">a</string> <!-- java.text.SimpleDateFormat uses H for hours in the 0-23 range and android.text.format.DateFormat uses k for hours in the 0-23 range. @@ -113,6 +114,8 @@ <string name="weather_refreshing">Refreshing</string> <string name="weather_last_sync_just_now">Just now</string> <string name="weather_cannot_reach_provider">Can\'t reach %s at the moment</string> + <string name="weather_source_not_selected">No weather source selected</string> + <string name="weather_tap_to_select_source">Tap to select one</string> <!-- Weather - Update frequency --> <string name="weather_refresh_manual">Manual</string> @@ -145,8 +148,6 @@ <string name="weather_enabled">Enabled</string> <string name="weather_enable">Display weather</string> <string name="weather_source_title">Weather source</string> - <string name="weather_source_yahoo">Yahoo! Weather</string> - <string name="weather_source_openweathermap" translatable="false">OpenWeatherMap</string> <string name="weather_use_custom_location">Use custom location</string> <string name="weather_geolocated">Geolocated using network</string> <string name="weather_custom_location_dialog_title">Enter location</string> diff --git a/res/xml/preferences_weather.xml b/res/xml/preferences_weather.xml index db832a6..6f7842e 100644 --- a/res/xml/preferences_weather.xml +++ b/res/xml/preferences_weather.xml @@ -26,18 +26,17 @@ android:title="@string/weather_enable" android:defaultValue="true" /> - <ListPreference + <PreferenceScreen android:key="weather_source" - android:defaultValue="yahoo" - android:dependency="show_weather" - android:summary="%s" - android:entries="@array/weather_source_entries" - android:entryValues="@array/weather_source_values" - android:title="@string/weather_source_title" /> + android:defaultValue="" + android:summary="@string/weather_source_not_selected" + android:title="@string/weather_source_title"> + <intent android:action="cyanogenmod.intent.action.MANAGE_WEATHER_PROVIDER_SERVICES" /> + </PreferenceScreen> <ListPreference android:key="weather_refresh_interval" - android:dependency="show_weather" + android:dependency="weather_source" android:defaultValue="60" android:summary="%s" android:entries="@array/weather_interval_entries" @@ -46,7 +45,7 @@ <SwitchPreference android:key="weather_use_custom_location" - android:dependency="show_weather" + android:dependency="weather_source" android:title="@string/weather_use_custom_location" android:defaultValue="false" /> @@ -64,42 +63,43 @@ android:key="weather_icons" android:title="@string/weather_icon_set_title" android:dialogTitle="@string/weather_icon_set_title" + android:dependency="weather_source" android:defaultValue="color" /> <SwitchPreference android:key="weather_show_when_minimized" - android:dependency="show_weather" + android:dependency="weather_source" android:title="@string/weather_show_when_minimized_title" android:summary="@string/weather_show_when_minimized_summary" android:defaultValue="true" /> <SwitchPreference android:key="weather_use_metric" - android:dependency="show_weather" + android:dependency="weather_source" android:title="@string/weather_use_metric" /> <SwitchPreference android:key="weather_show_location" - android:dependency="show_weather" + android:dependency="weather_source" android:title="@string/weather_show_location_title" android:defaultValue="true" /> <SwitchPreference android:key="weather_show_timestamp" - android:dependency="show_weather" + android:dependency="weather_source" android:title="@string/weather_show_timestamp_title" android:defaultValue="true" /> <SwitchPreference android:key="weather_invert_lowhigh" - android:dependency="show_weather" + android:dependency="weather_source" android:title="@string/weather_invert_lowhigh" android:defaultValue="false" /> <ListPreference android:key="weather_font_color" android:title="@string/font_color" - android:dependency="show_weather" + android:dependency="weather_source" android:defaultValue="#ffffffff" android:entries="@array/font_color_entries" android:entryValues="@array/font_color_values" /> @@ -107,7 +107,7 @@ <ListPreference android:key="weather_timestamp_font_color" android:title="@string/font_color_timestamp" - android:dependency="show_weather" + android:dependency="weather_source" android:defaultValue="#80ffffff" android:entries="@array/font_color_entries" android:entryValues="@array/font_color_values" /> diff --git a/src/com/cyanogenmod/lockclock/ClockWidgetProvider.java b/src/com/cyanogenmod/lockclock/ClockWidgetProvider.java index d13d519..fbab355 100644 --- a/src/com/cyanogenmod/lockclock/ClockWidgetProvider.java +++ b/src/com/cyanogenmod/lockclock/ClockWidgetProvider.java @@ -24,11 +24,12 @@ import android.net.ConnectivityManager; import android.util.Log; import com.cyanogenmod.lockclock.misc.Constants; +import com.cyanogenmod.lockclock.misc.Preferences; import com.cyanogenmod.lockclock.misc.WidgetUtils; import com.cyanogenmod.lockclock.weather.ForecastActivity; +import com.cyanogenmod.lockclock.weather.Utils; +import com.cyanogenmod.lockclock.weather.WeatherSourceListenerService; import com.cyanogenmod.lockclock.weather.WeatherUpdateService; -import com.cyanogenmod.lockclock.ClockWidgetService; -import com.cyanogenmod.lockclock.WidgetApplication; public class ClockWidgetProvider extends AppWidgetProvider { private static final String TAG = "ClockWidgetProvider"; @@ -49,7 +50,8 @@ public class ClockWidgetProvider extends AppWidgetProvider { if (D) Log.v(TAG, "Received intent " + intent); // Network connection has changed, make sure the weather update service knows about it - if (ConnectivityManager.CONNECTIVITY_ACTION.equals(action)) { + if (ConnectivityManager.CONNECTIVITY_ACTION.equals(action) + && Utils.isWeatherServiceAvailable(context)) { boolean hasConnection = !intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false); @@ -64,10 +66,9 @@ public class ClockWidgetProvider extends AppWidgetProvider { // Boot completed, schedule next weather update } else if (Intent.ACTION_BOOT_COMPLETED.equals(action)) { - // On first boot lastUpdate will be 0 thus no need to force an update - // Subsequent boots will use cached data - WeatherUpdateService.scheduleNextUpdate(context, false); - + //Since we're using elapsed time since boot, we can't use the timestamp from the + //previous boot so we need to reset the timer + Preferences.setLastWeatherUpadteTimestamp(context, 0); // A widget has been deleted, prevent our handling and ask the super class handle it } else if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action) || AppWidgetManager.ACTION_APPWIDGET_DISABLED.equals(action)) { @@ -124,7 +125,10 @@ public class ClockWidgetProvider extends AppWidgetProvider { @Override public void onEnabled(Context context) { if (D) Log.d(TAG, "Scheduling next weather update"); - WeatherUpdateService.scheduleNextUpdate(context, true); + if (Utils.isWeatherServiceAvailable(context)) { + context.startService(new Intent(context, WeatherSourceListenerService.class)); + WeatherUpdateService.scheduleNextUpdate(context, true); + } // Start the broadcast receiver (API 16 devices) // This will schedule a repeating alarm every minute to handle the clock refresh @@ -138,8 +142,11 @@ public class ClockWidgetProvider extends AppWidgetProvider { @Override public void onDisabled(Context context) { if (D) Log.d(TAG, "Cleaning up: Clearing all pending alarms"); - ClockWidgetService.cancelUpdates(context); - WeatherUpdateService.cancelUpdates(context); + if (Utils.isWeatherServiceAvailable(context)) { + context.stopService(new Intent(context, WeatherSourceListenerService.class)); + ClockWidgetService.cancelUpdates(context); + WeatherUpdateService.cancelUpdates(context); + } // Stop the clock update event (API 16 devices) if (!WidgetUtils.isTextClockAvailable()) { diff --git a/src/com/cyanogenmod/lockclock/ClockWidgetService.java b/src/com/cyanogenmod/lockclock/ClockWidgetService.java index d5f6635..ced9d8f 100644 --- a/src/com/cyanogenmod/lockclock/ClockWidgetService.java +++ b/src/com/cyanogenmod/lockclock/ClockWidgetService.java @@ -27,21 +27,24 @@ import android.content.Intent; import android.content.res.Resources; import android.net.Uri; import android.os.Bundle; -import android.provider.Settings; import android.text.TextUtils; import android.text.format.DateFormat; import android.util.Log; import android.util.TypedValue; import android.view.View; import android.widget.RemoteViews; - import com.cyanogenmod.lockclock.calendar.CalendarViewsService; import com.cyanogenmod.lockclock.misc.Constants; import com.cyanogenmod.lockclock.misc.IconUtils; import com.cyanogenmod.lockclock.misc.Preferences; import com.cyanogenmod.lockclock.misc.WidgetUtils; -import com.cyanogenmod.lockclock.weather.WeatherInfo; +import com.cyanogenmod.lockclock.weather.Utils; import com.cyanogenmod.lockclock.weather.WeatherUpdateService; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.TempUnit.FAHRENHEIT; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.TempUnit.CELSIUS; +import cyanogenmod.weather.CMWeatherManager; +import cyanogenmod.weather.WeatherInfo; +import cyanogenmod.weather.util.WeatherUtils; import java.text.SimpleDateFormat; import java.util.Date; @@ -60,6 +63,7 @@ public class ClockWidgetService extends IntentService { private int[] mWidgetIds; private AppWidgetManager mAppWidgetManager; + private Context mContext; public ClockWidgetService() { super("ClockWidgetService"); @@ -72,6 +76,7 @@ public class ClockWidgetService extends IntentService { ComponentName thisWidget = new ComponentName(this, ClockWidgetProvider.class); mAppWidgetManager = AppWidgetManager.getInstance(this); mWidgetIds = mAppWidgetManager.getAppWidgetIds(thisWidget); + mContext = getApplicationContext(); } @Override @@ -231,6 +236,8 @@ public class ClockWidgetService extends IntentService { String hours = new SimpleDateFormat(getHourFormat(), locale).format(now); String minutes = new SimpleDateFormat(getString(R.string.widget_12_hours_format_no_ampm_m), locale).format(now); + String amPM = new SimpleDateFormat(getString(R.string.widget_12_hours_format_ampm), + locale).format(now); // Hours if (Preferences.useBoldFontForHours(this)) { @@ -256,11 +263,14 @@ public class ClockWidgetService extends IntentService { } else { clockViews.setTextViewText(R.id.date, date); } + + if (!DateFormat.is24HourFormat(this) && Preferences.showAmPmIndicator(this)) { + clockViews.setTextViewText(R.id.clock_ampm, amPM); + } } private void refreshClockFont(RemoteViews clockViews, boolean smallWidget) { int color = Preferences.clockFontColor(this); - String amPM = new SimpleDateFormat("a", Locale.getDefault()).format(new Date()); // Hours if (Preferences.useBoldFontForHours(this)) { @@ -287,7 +297,6 @@ public class ClockWidgetService extends IntentService { // Show the AM/PM indicator if (!DateFormat.is24HourFormat(this) && Preferences.showAmPmIndicator(this)) { clockViews.setViewVisibility(R.id.clock_ampm, View.VISIBLE); - clockViews.setTextViewText(R.id.clock_ampm, amPM); clockViews.setTextColor(R.id.clock_ampm, color); } else { clockViews.setViewVisibility(R.id.clock_ampm, View.GONE); @@ -413,27 +422,48 @@ public class ClockWidgetService extends IntentService { int color = Preferences.weatherFontColor(this); int timestampColor = Preferences.weatherTimestampFontColor(this); String iconsSet = Preferences.getWeatherIconSet(this); + final boolean useMetric = Preferences.useMetricUnits(mContext); // Reset no weather visibility weatherViews.setViewVisibility(R.id.weather_no_data, View.GONE); weatherViews.setViewVisibility(R.id.weather_refresh, View.GONE); // Weather Image - int resId = w.getConditionResource(iconsSet); + int resId = IconUtils.getWeatherIconResource(mContext, iconsSet, w.getConditionCode()); weatherViews.setViewVisibility(R.id.weather_image, View.VISIBLE); if (resId != 0) { - weatherViews.setImageViewResource(R.id.weather_image, w.getConditionResource(iconsSet)); + weatherViews.setImageViewResource(R.id.weather_image, + IconUtils.getWeatherIconResource(mContext, iconsSet, w.getConditionCode())); } else { - weatherViews.setImageViewBitmap(R.id.weather_image, w.getConditionBitmap(iconsSet, color)); + weatherViews.setImageViewBitmap(R.id.weather_image, + IconUtils.getWeatherIconBitmap(mContext, iconsSet, color, + w.getConditionCode())); } // Weather Condition - weatherViews.setTextViewText(R.id.weather_condition, w.getCondition()); + weatherViews.setTextViewText(R.id.weather_condition, + Utils.resolveWeatherCondition(mContext, w.getConditionCode())); weatherViews.setViewVisibility(R.id.weather_condition, View.VISIBLE); weatherViews.setTextColor(R.id.weather_condition, color); // Weather Temps Panel - weatherViews.setTextViewText(R.id.weather_temp, w.getFormattedTemperature()); + double temp = w.getTemperature(); + double todaysLow = w.getTodaysLow(); + double todaysHigh = w.getTodaysHigh(); + int tempUnit = w.getTemperatureUnit(); + if (tempUnit == FAHRENHEIT && useMetric) { + temp = WeatherUtils.fahrenheitToCelsius(temp); + todaysLow = WeatherUtils.fahrenheitToCelsius(todaysLow); + todaysHigh = WeatherUtils.fahrenheitToCelsius(todaysHigh); + tempUnit = CELSIUS; + } else if (tempUnit == CELSIUS && !useMetric) { + temp = WeatherUtils.celsiusToFahrenheit(temp); + todaysLow = WeatherUtils.celsiusToFahrenheit(todaysLow); + todaysHigh = WeatherUtils.celsiusToFahrenheit(todaysHigh); + tempUnit = FAHRENHEIT; + } + weatherViews.setTextViewText(R.id.weather_temp, + WeatherUtils.formatTemperature(temp, tempUnit)); weatherViews.setViewVisibility(R.id.weather_temps_panel, View.VISIBLE); weatherViews.setTextColor(R.id.weather_temp, color); @@ -450,7 +480,7 @@ public class ClockWidgetService extends IntentService { // Weather Update Time if (showTimestamp) { - Date updateTime = w.getTimestamp(); + Date updateTime = new Date(w.getTimestamp()); StringBuilder sb = new StringBuilder(); sb.append(DateFormat.format("E", updateTime)); sb.append(" "); @@ -464,8 +494,8 @@ public class ClockWidgetService extends IntentService { // Weather Temps Panel additional items boolean invertLowhigh = Preferences.invertLowHighTemperature(this); - final String low = w.getFormattedLow(); - final String high = w.getFormattedHigh(); + final String low = WeatherUtils.formatTemperature(todaysLow, tempUnit); + final String high = WeatherUtils.formatTemperature(todaysHigh, tempUnit); weatherViews.setTextViewText(R.id.weather_low_high, invertLowhigh ? high + " | " + low : low + " | " + high); weatherViews.setTextColor(R.id.weather_low_high, color); } @@ -482,8 +512,14 @@ public class ClockWidgetService extends IntentService { boolean firstRun = Preferences.isFirstWeatherUpdate(this); // Hide the normal weather stuff - int providerNameResource = Preferences.weatherProvider(this).getNameResourceId(); - String noData = getString(R.string.weather_cannot_reach_provider, getString(providerNameResource)); + final CMWeatherManager weatherManager = CMWeatherManager.getInstance(mContext); + final String activeProviderLabel = weatherManager.getActiveWeatherServiceProviderLabel(); + String noData; + if (activeProviderLabel != null) { + noData = getString(R.string.weather_cannot_reach_provider, activeProviderLabel); + } else { + noData = getString(R.string.weather_source_not_selected); + } weatherViews.setViewVisibility(R.id.weather_image, View.INVISIBLE); if (!smallWidget) { weatherViews.setViewVisibility(R.id.weather_city, View.GONE); @@ -493,7 +529,13 @@ public class ClockWidgetService extends IntentService { // Set up the no data and refresh indicators weatherViews.setTextViewText(R.id.weather_no_data, noData); - weatherViews.setTextViewText(R.id.weather_refresh, getString(R.string.weather_tap_to_refresh)); + if (activeProviderLabel != null) { + weatherViews.setTextViewText(R.id.weather_refresh, + getString(R.string.weather_tap_to_refresh)); + } else { + weatherViews.setTextViewText(R.id.weather_refresh, + getString(R.string.weather_tap_to_select_source)); + } weatherViews.setTextColor(R.id.weather_no_data, color); weatherViews.setTextColor(R.id.weather_refresh, color); @@ -509,7 +551,11 @@ public class ClockWidgetService extends IntentService { // Register an onClickListener on Weather with the default (Refresh) action if (!firstRun) { - setWeatherClickListener(weatherViews, true); + if (activeProviderLabel != null) { + setWeatherClickListener(weatherViews, true); + } else { + setWeatherClickListener(weatherViews); + } } } @@ -528,7 +574,13 @@ public class ClockWidgetService extends IntentService { weatherViews.setOnClickPendingIntent(R.id.weather_panel, pi); } - + private void setWeatherClickListener(RemoteViews weatherViews) { + PendingIntent pi = PendingIntent.getActivity(mContext, 0, + new Intent("cyanogenmod.intent.action.MANAGE_WEATHER_PROVIDER_SERVICES"), + PendingIntent.FLAG_UPDATE_CURRENT); + weatherViews.setOnClickPendingIntent(R.id.weather_panel, pi); + } + //=============================================================================================== // Calendar related functionality //=============================================================================================== diff --git a/src/com/cyanogenmod/lockclock/misc/Constants.java b/src/com/cyanogenmod/lockclock/misc/Constants.java index a7113f2..fb35a57 100755 --- a/src/com/cyanogenmod/lockclock/misc/Constants.java +++ b/src/com/cyanogenmod/lockclock/misc/Constants.java @@ -38,14 +38,14 @@ public class Constants { public static final String SHOW_WEATHER = "show_weather"; public static final String WEATHER_SOURCE = "weather_source"; public static final String WEATHER_USE_CUSTOM_LOCATION = "weather_use_custom_location"; - public static final String WEATHER_CUSTOM_LOCATION_ID = "weather_custom_location_id"; public static final String WEATHER_CUSTOM_LOCATION_CITY = "weather_custom_location_city"; + public static final String WEATHER_CUSTOM_LOCATION = "weather_custom_location"; + public static final String WEATHER_LOCATION = "weather_location"; public static final String WEATHER_SHOW_LOCATION = "weather_show_location"; public static final String WEATHER_SHOW_TIMESTAMP = "weather_show_timestamp"; public static final String WEATHER_USE_METRIC = "weather_use_metric"; public static final String WEATHER_INVERT_LOWHIGH = "weather_invert_lowhigh"; public static final String WEATHER_REFRESH_INTERVAL = "weather_refresh_interval"; - public static final String WEATHER_LOCATION_ID = "weather_woeid"; public static final String WEATHER_SHOW_WHEN_MINIMIZED = "weather_show_when_minimized"; public static final String WEATHER_FONT_COLOR = "weather_font_color"; public static final String WEATHER_TIMESTAMP_FONT_COLOR = "weather_timestamp_font_color"; diff --git a/src/com/cyanogenmod/lockclock/misc/IconUtils.java b/src/com/cyanogenmod/lockclock/misc/IconUtils.java index 437d075..3a4f4d0 100644 --- a/src/com/cyanogenmod/lockclock/misc/IconUtils.java +++ b/src/com/cyanogenmod/lockclock/misc/IconUtils.java @@ -30,6 +30,7 @@ import android.graphics.drawable.Drawable; import android.util.DisplayMetrics; import android.util.Log; import com.cyanogenmod.lockclock.R; +import com.cyanogenmod.lockclock.weather.Utils; public class IconUtils { private static final String TAG = "IconUtils"; @@ -41,8 +42,9 @@ public class IconUtils { } final Resources res = context.getResources(); - final int resId = res.getIdentifier("weather_" + iconSet + "_" + conditionCode, - "drawable", context.getPackageName()); + final int resId = res.getIdentifier("weather_" + iconSet + "_" + + Utils.addOffsetToConditionCodeFromWeatherContract(conditionCode), "drawable", + context.getPackageName()); if (resId != 0) { return resId; @@ -62,12 +64,13 @@ public class IconUtils { boolean isMonoSet = Constants.MONOCHROME.equals(iconSet); Resources res = null; int resId = 0; + int fixedConditionCode = Utils.addOffsetToConditionCodeFromWeatherContract(conditionCode); if (iconSet.startsWith("ext:")) { String packageName = iconSet.substring(4); try { res = context.getPackageManager().getResourcesForApplication(packageName); - resId = res.getIdentifier("weather_" + conditionCode, "drawable", packageName); + resId = res.getIdentifier("weather_" + fixedConditionCode, "drawable", packageName); } catch (PackageManager.NameNotFoundException e) { // fall back to colored icons iconSet = Constants.COLOR_STD; @@ -75,7 +78,8 @@ public class IconUtils { } if (resId == 0) { String identifier = isMonoSet - ? "weather_" + conditionCode : "weather_" + iconSet + "_" + conditionCode; + ? "weather_" + fixedConditionCode : "weather_" + + iconSet + "_" + fixedConditionCode; res = context.getResources(); resId = res.getIdentifier(identifier, "drawable", context.getPackageName()); } diff --git a/src/com/cyanogenmod/lockclock/misc/Preferences.java b/src/com/cyanogenmod/lockclock/misc/Preferences.java index 941e761..0e1062e 100644 --- a/src/com/cyanogenmod/lockclock/misc/Preferences.java +++ b/src/com/cyanogenmod/lockclock/misc/Preferences.java @@ -19,17 +19,44 @@ package com.cyanogenmod.lockclock.misc; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Color; - -import com.cyanogenmod.lockclock.weather.OpenWeatherMapProvider; -import com.cyanogenmod.lockclock.weather.WeatherInfo; -import com.cyanogenmod.lockclock.weather.WeatherProvider; -import com.cyanogenmod.lockclock.weather.YahooWeatherProvider; - +import com.cyanogenmod.lockclock.weather.Utils; +import cyanogenmod.weather.WeatherInfo; +import cyanogenmod.weather.WeatherLocation; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.ArrayList; import java.util.Calendar; import java.util.Locale; import java.util.Set; public class Preferences { + + private static final String WEATHER_LOCATION_CITY_ID = "city_id"; + private static final String WEATHER_LOCATION_CITY_NAME = "city_name"; + private static final String WEATHER_LOCATION_STATE = "state"; + private static final String WEATHER_LOCATION_POSTAL_CODE = "postal_code"; + private static final String WEATHER_LOCATION_COUNTRY_ID = "country_id"; + private static final String WEATHER_LOCATION_COUNTRY_NAME = "country_name"; + + private static final String WEATHER_INFO_CITY = "city"; + private static final String WEATHER_INFO_CONDITION_CODE = "condition_code"; + private static final String WEATHER_INFO_TEMPERATURE = "temperature"; + private static final String WEATHER_INFO_TEMPERATURE_UNIT = "temperature_unit"; + private static final String WEATHER_INFO_TIMESTAMP = "timestamp"; + private static final String WEATHER_INFO_HUMIDITY = "humidity"; + private static final String WEATHER_INFO_TODAYS_HIGH = "todays_high"; + private static final String WEATHER_INFO_TODAYS_LOW = "todays_low"; + private static final String WEATHER_INFO_WIND_SPEED = "wind_speed"; + private static final String WEATHER_INFO_WIND_SPEED_UNIT = "wind_speed_unit"; + private static final String WEATHER_INFO_WIND_SPEED_DIRECTION = "wind_speed_direction"; + private static final String WEATHER_INFO_FORECAST = "forecasts"; + + private static final String DAY_FORECAST_CONDITION_CODE = "condition_code"; + private static final String DAY_FORECAST_LOW = "low"; + private static final String DAY_FORECAST_HIGH = "high"; + private Preferences() { } @@ -46,7 +73,8 @@ public class Preferences { } public static boolean showWeather(Context context) { - return getPrefs(context).getBoolean(Constants.SHOW_WEATHER, true); + return getPrefs(context).getBoolean(Constants.SHOW_WEATHER, true) + && Utils.isWeatherServiceAvailable(context); } public static boolean showCalendar(Context context) { @@ -172,7 +200,7 @@ public class Preferences { public static long weatherRefreshIntervalInMs(Context context) { String value = getPrefs(context).getString(Constants.WEATHER_REFRESH_INTERVAL, "60"); - return Long.parseLong(value) * 60 * 1000; + return Long.parseLong(value) * 60L * 1000L; } public static boolean useCustomWeatherLocation(Context context) { @@ -183,37 +211,148 @@ public class Preferences { getPrefs(context).edit().putBoolean(Constants.WEATHER_USE_CUSTOM_LOCATION, value).apply(); } - public static String customWeatherLocationId(Context context) { - return getPrefs(context).getString(Constants.WEATHER_CUSTOM_LOCATION_ID, null); + public static String getCustomWeatherLocationCity(Context context) { + return getPrefs(context).getString(Constants.WEATHER_CUSTOM_LOCATION_CITY, null); } - public static void setCustomWeatherLocationId(Context context, String id) { - getPrefs(context).edit().putString(Constants.WEATHER_CUSTOM_LOCATION_ID, id).apply(); + public static void setCustomWeatherLocationCity(Context context, String city) { + getPrefs(context).edit().putString(Constants.WEATHER_CUSTOM_LOCATION_CITY, city).apply(); } - public static String customWeatherLocationCity(Context context) { - return getPrefs(context).getString(Constants.WEATHER_CUSTOM_LOCATION_CITY, null); + public static boolean setCustomWeatherLocation(Context context, WeatherLocation weatherLocation) { + if (weatherLocation == null) { + getPrefs(context).edit() + .remove(Constants.WEATHER_CUSTOM_LOCATION).apply(); + return true; + } + try { + JSONObject jsonObject = weatherLocationToJSON(weatherLocation); + getPrefs(context).edit() + .putString(Constants.WEATHER_CUSTOM_LOCATION, jsonObject.toString()).apply(); + return true; + } catch (JSONException e) { + // We're here because weatherLocationToJSON() or jsonObject.toString() failed. + // Either way, it means the pref was not updated + return false; + } } - public static void setCustomWeatherLocationCity(Context context, String city) { - getPrefs(context).edit().putString(Constants.WEATHER_CUSTOM_LOCATION_CITY, city).apply(); + public static WeatherLocation getCustomWeatherLocation(Context context) { + String weatherLocation = getPrefs(context) + .getString(Constants.WEATHER_CUSTOM_LOCATION, null); + + if (weatherLocation == null) { + return null; + } + + try { + JSONObject jsonObject = new JSONObject(weatherLocation); + return JSONToWeatherLocation(jsonObject); + } catch (JSONException e) { + return null; + } } - public static WeatherProvider weatherProvider(Context context) { - String name = getPrefs(context).getString(Constants.WEATHER_SOURCE, "yahoo"); - if (name.equals("openweathermap")) { - return new OpenWeatherMapProvider(context); + private static WeatherLocation JSONToWeatherLocation(JSONObject jsonObject) + throws JSONException { + String cityId; + String cityName; + String state; + String postalCode; + String countryId; + String countryName; + + cityId = jsonObject.getString(WEATHER_LOCATION_CITY_ID); + cityName = jsonObject.getString(WEATHER_LOCATION_CITY_NAME); + state = jsonObject.getString(WEATHER_LOCATION_STATE); + postalCode = jsonObject.getString(WEATHER_LOCATION_POSTAL_CODE); + countryId = jsonObject.getString(WEATHER_LOCATION_COUNTRY_ID); + countryName = jsonObject.getString(WEATHER_LOCATION_COUNTRY_NAME); + + //We need at least city id and city name to build a WeatherLocation + if (cityId == null && cityName == null) { + return null; } - return new YahooWeatherProvider(context); + + WeatherLocation.Builder location = new WeatherLocation.Builder(cityId, cityName); + if (countryId != null) location.setCountryId(countryId); + if (countryName != null) location.setCountry(countryName); + if (state != null) location.setState(state); + if (postalCode != null) location.setPostalCode(postalCode); + + return location.build(); } - public static void setCachedWeatherInfo(Context context, long timestamp, WeatherInfo data) { + private static JSONObject weatherLocationToJSON(WeatherLocation location) throws JSONException { + return new JSONObject() + .put(WEATHER_LOCATION_CITY_ID, location.getCityId()) + .put(WEATHER_LOCATION_CITY_NAME, location.getCity()) + .put(WEATHER_LOCATION_STATE, location.getState()) + .put(WEATHER_LOCATION_POSTAL_CODE, location.getPostalCode()) + .put(WEATHER_LOCATION_COUNTRY_ID, location.getCountryId()) + .put(WEATHER_LOCATION_COUNTRY_NAME, location.getCountry()); + } + + public static void setCachedWeatherInfo(Context context, long timestamp, WeatherInfo info) { SharedPreferences.Editor editor = getPrefs(context).edit(); editor.putLong(Constants.WEATHER_LAST_UPDATE, timestamp); - if (data != null) { + if (info != null) { // We now have valid weather data to display - editor.putBoolean(Constants.WEATHER_FIRST_UPDATE, false); - editor.putString(Constants.WEATHER_DATA, data.toSerializedString()); + JSONObject jsonObject = new JSONObject(); + boolean serialized = false; + try { + //These members always return a value that can be parsed + jsonObject + .put(WEATHER_INFO_CITY, info.getCity()) + .put(WEATHER_INFO_CONDITION_CODE, info.getConditionCode()) + .put(WEATHER_INFO_TEMPERATURE, info.getTemperature()) + .put(WEATHER_INFO_TEMPERATURE_UNIT, info.getTemperatureUnit()) + .put(WEATHER_INFO_TIMESTAMP, info.getTimestamp()); + + // Handle special cases. JSONObject.put(key, double) does not allow + // Double.NaN, so we store it as a string. JSONObject.getDouble() will parse the + // "NaN" string and return Double.NaN, which is what we want + double humidity = info.getHumidity(); + jsonObject.put(WEATHER_INFO_HUMIDITY, Double.isNaN(humidity) ? "NaN" : humidity); + + double todaysHigh = info.getTodaysHigh(); + jsonObject.put(WEATHER_INFO_TODAYS_HIGH, Double.isNaN(todaysHigh) + ? "NaN" : todaysHigh); + + double todaysLow = info.getTodaysLow(); + jsonObject.put(WEATHER_INFO_TODAYS_LOW, Double.isNaN(todaysLow) + ? "NaN" : todaysLow); + + double windSpeed = info.getWindSpeed(); + double windDirection = info.getWindDirection(); + jsonObject.put(WEATHER_INFO_WIND_SPEED, Double.isNaN(windSpeed) ? "NaN" : windSpeed) + .put(WEATHER_INFO_WIND_SPEED_UNIT, info.getWindSpeedUnit()) + .put(WEATHER_INFO_WIND_SPEED_DIRECTION, Double.isNaN(windDirection) + ? "NaN" : windDirection); + + JSONArray forecastArray = new JSONArray(); + for (WeatherInfo.DayForecast forecast : info.getForecasts()) { + JSONObject jsonForecast = new JSONObject() + .put(DAY_FORECAST_CONDITION_CODE, forecast.getConditionCode()); + + double low = forecast.getLow(); + jsonForecast.put(DAY_FORECAST_LOW, Double.isNaN(low) ? "NaN" : low); + double high = forecast.getHigh(); + jsonForecast.put(DAY_FORECAST_HIGH, Double.isNaN(high) ? "NaN" : high); + forecastArray.put(jsonForecast); + } + jsonObject.put(WEATHER_INFO_FORECAST, forecastArray); + serialized = true; + } catch (JSONException e) { + // We're here because something went wrong while creating the JSON object. + // The code below will check for success and proceed accordingly + } + if (serialized) { + editor.putString(Constants.WEATHER_DATA, jsonObject.toString()); + editor.putBoolean(Constants.WEATHER_FIRST_UPDATE, false); + } + } else { + editor.remove(Constants.WEATHER_DATA); } editor.apply(); } @@ -222,17 +361,78 @@ public class Preferences { return getPrefs(context).getLong(Constants.WEATHER_LAST_UPDATE, 0); } + public static void setLastWeatherUpadteTimestamp(Context context, long timestamp) { + getPrefs(context).edit().putLong(Constants.WEATHER_LAST_UPDATE, timestamp).apply(); + } + public static WeatherInfo getCachedWeatherInfo(Context context) { - return WeatherInfo.fromSerializedString(context, - getPrefs(context).getString(Constants.WEATHER_DATA, null)); + final String cachedInfo = getPrefs(context).getString(Constants.WEATHER_DATA, null); + + if (cachedInfo == null) return null; + + String city; + int conditionCode; + double temperature; + int tempUnit; + double humidity; + double windSpeed; + double windDirection; + double todaysHigh; + double todaysLow; + int windSpeedUnit; + long timestamp; + ArrayList<WeatherInfo.DayForecast> forecastList = new ArrayList<>(); + + try { + JSONObject cached = new JSONObject(cachedInfo); + city = cached.getString(WEATHER_INFO_CITY); + conditionCode = cached.getInt(WEATHER_INFO_CONDITION_CODE); + temperature = cached.getDouble(WEATHER_INFO_TEMPERATURE); + tempUnit = cached.getInt(WEATHER_INFO_TEMPERATURE_UNIT); + humidity = cached.getDouble(WEATHER_INFO_HUMIDITY); + windSpeed = cached.getDouble(WEATHER_INFO_WIND_SPEED); + windDirection = cached.getDouble(WEATHER_INFO_WIND_SPEED_DIRECTION); + windSpeedUnit = cached.getInt(WEATHER_INFO_WIND_SPEED_UNIT); + timestamp = cached.getLong(WEATHER_INFO_TIMESTAMP); + todaysHigh = cached.getDouble(WEATHER_INFO_TODAYS_HIGH); + todaysLow = cached.getDouble(WEATHER_INFO_TODAYS_LOW); + JSONArray forecasts = cached.getJSONArray(WEATHER_INFO_FORECAST); + for (int indx = 0; indx < forecasts.length(); indx++) { + JSONObject forecast = forecasts.getJSONObject(indx); + double low; + double high; + int code; + low = forecast.getDouble(DAY_FORECAST_LOW); + high = forecast.getDouble(DAY_FORECAST_HIGH); + code = forecast.getInt(DAY_FORECAST_CONDITION_CODE); + WeatherInfo.DayForecast.Builder f = new WeatherInfo.DayForecast.Builder(code); + if (!Double.isNaN(low)) f.setLow(low); + if (!Double.isNaN(high)) f.setHigh(high); + forecastList.add(f.build()); + } + WeatherInfo.Builder weatherInfo = new WeatherInfo.Builder(city, temperature, tempUnit) + .setWeatherCondition(conditionCode) + .setTimestamp(timestamp); + + if (!Double.isNaN(humidity)) weatherInfo.setHumidity(humidity); + if (!Double.isNaN(windSpeed) && !Double.isNaN(windDirection)) { + weatherInfo.setWind(windSpeed, windDirection, windSpeedUnit); + } + if (forecastList.size() > 0) weatherInfo.setForecast(forecastList); + if (!Double.isNaN(todaysHigh)) weatherInfo.setTodaysHigh(todaysHigh); + if (!Double.isNaN(todaysLow)) weatherInfo.setTodaysLow(todaysLow); + return weatherInfo.build(); + } catch (JSONException e) { + } + return null; } - public static String getCachedLocationId(Context context) { - return getPrefs(context).getString(Constants.WEATHER_LOCATION_ID, null); + public static void setWeatherSource(Context context, String source) { + getPrefs(context).edit().putString(Constants.WEATHER_SOURCE, source).apply(); } - public static void setCachedLocationId(Context context, String id) { - getPrefs(context).edit().putString(Constants.WEATHER_LOCATION_ID, id).apply(); + public static String getWeatherSource(Context context) { + return getPrefs(context).getString(Constants.WEATHER_SOURCE, null); } public static Set<String> calendarsToDisplay(Context context) { diff --git a/src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java b/src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java index 2d6b4a8..1a430f9 100644 --- a/src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java +++ b/src/com/cyanogenmod/lockclock/preference/CalendarPreferences.java @@ -79,7 +79,6 @@ public class CalendarPreferences extends PreferenceFragment implements if (!hasCalendarPermission()) { mShowCalendar.setChecked(false); } else { - mShowCalendar.setChecked(true); updateCalendars(); } } diff --git a/src/com/cyanogenmod/lockclock/preference/CustomLocationPreference.java b/src/com/cyanogenmod/lockclock/preference/CustomLocationPreference.java index 6d0992f..c290cf5 100644 --- a/src/com/cyanogenmod/lockclock/preference/CustomLocationPreference.java +++ b/src/com/cyanogenmod/lockclock/preference/CustomLocationPreference.java @@ -17,27 +17,27 @@ package com.cyanogenmod.lockclock.preference; import android.app.AlertDialog; -import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; -import android.os.AsyncTask; import android.os.Bundle; +import android.os.Handler; import android.preference.EditTextPreference; import android.text.TextUtils; import android.util.AttributeSet; import android.view.View; import android.widget.Button; import android.widget.Toast; - import com.cyanogenmod.lockclock.R; import com.cyanogenmod.lockclock.misc.Preferences; -import com.cyanogenmod.lockclock.weather.WeatherProvider.LocationResult; +import cyanogenmod.weather.CMWeatherManager; +import cyanogenmod.weather.WeatherLocation; import java.util.HashSet; import java.util.List; -public class CustomLocationPreference extends EditTextPreference { +public class CustomLocationPreference extends EditTextPreference + implements CMWeatherManager.LookupCityRequestListener { public CustomLocationPreference(Context context) { super(context); } @@ -48,18 +48,35 @@ public class CustomLocationPreference extends EditTextPreference { super(context, attrs, defStyle); } + private ProgressDialog mProgressDialog; + private int mCustomLocationRequestId; + private Handler mHandler; @Override protected void showDialog(Bundle state) { super.showDialog(state); + mHandler = new Handler(getContext().getMainLooper()); final AlertDialog d = (AlertDialog) getDialog(); - Button okButton = d.getButton(DialogInterface.BUTTON_POSITIVE); - + final Button okButton = d.getButton(DialogInterface.BUTTON_POSITIVE); okButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { CustomLocationPreference.this.onClick(d, DialogInterface.BUTTON_POSITIVE); - new WeatherLocationTask(d, getEditText().getText().toString()).execute(); + final String customLocationToLookUp = getEditText().getText().toString(); + if (TextUtils.equals(customLocationToLookUp, "")) return; + final CMWeatherManager weatherManager = CMWeatherManager.getInstance(getContext()); + mProgressDialog = new ProgressDialog(getContext()); + mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); + mProgressDialog.setMessage(getContext().getString(R.string.weather_progress_title)); + mProgressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() { + @Override + public void onCancel(DialogInterface dialog) { + weatherManager.cancelRequest(mCustomLocationRequestId); + } + }); + mCustomLocationRequestId = weatherManager.lookupCity(customLocationToLookUp, + CustomLocationPreference.this); + mProgressDialog.show(); } }); } @@ -68,10 +85,12 @@ public class CustomLocationPreference extends EditTextPreference { protected void onBindDialogView(View view) { super.onBindDialogView(view); - String location = Preferences.customWeatherLocationCity(getContext()); + String location = Preferences.getCustomWeatherLocationCity(getContext()); if (location != null) { getEditText().setText(location); getEditText().setSelection(location.length()); + } else { + getEditText().setText(""); } } @@ -81,115 +100,88 @@ public class CustomLocationPreference extends EditTextPreference { super.onDialogClosed(false); } - private class WeatherLocationTask extends AsyncTask<Void, Void, List<LocationResult>> { - private Dialog mDialog; - private ProgressDialog mProgressDialog; - private String mLocation; - - public WeatherLocationTask(Dialog dialog, String location) { - mDialog = dialog; - mLocation = location; - } - - @Override - protected void onPreExecute() { - super.onPreExecute(); - - final Context context = getContext(); + private void handleResultDisambiguation(final List<WeatherLocation> results) { + CharSequence[] items = buildItemList(results); + new AlertDialog.Builder(getContext()) + .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + applyLocation(results.get(which)); + dialog.dismiss(); + } + }) + .setNegativeButton(android.R.string.cancel, null) + .setTitle(R.string.weather_select_location) + .show(); + } - mProgressDialog = new ProgressDialog(context); - mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); - mProgressDialog.setMessage(context.getString(R.string.weather_progress_title)); - mProgressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() { - @Override - public void onCancel(DialogInterface dialog) { - cancel(true); - } - }); - mProgressDialog.show(); - } + private CharSequence[] buildItemList(List<WeatherLocation> results) { + boolean needCountry = false, needPostal = false; + String countryId = results.get(0).getCountryId(); + HashSet<String> postalIds = new HashSet<>(); - @Override - protected List<LocationResult> doInBackground(Void... input) { - return Preferences.weatherProvider(getContext()).getLocations(mLocation); + for (WeatherLocation result : results) { + if (!TextUtils.equals(result.getCountryId(), countryId)) { + needCountry = true; + } + String postalId = result.getCountryId() + "##" + result.getCity(); + if (postalIds.contains(postalId)) { + needPostal = true; + } + postalIds.add(postalId); + if (needPostal && needCountry) { + break; + } } - @Override - protected void onPostExecute(List<LocationResult> results) { - super.onPostExecute(results); - - final Context context = getContext(); - - if (results == null || results.isEmpty()) { - Toast.makeText(context, - context.getString(R.string.weather_retrieve_location_dialog_title), - Toast.LENGTH_SHORT) - .show(); - } else if (results.size() > 1) { - handleResultDisambiguation(results); - } else { - applyLocation(results.get(0)); + int count = results.size(); + CharSequence[] items = new CharSequence[count]; + for (int i = 0; i < count; i++) { + WeatherLocation result = results.get(i); + StringBuilder builder = new StringBuilder(); + if (needPostal && result.getPostalCode() != null) { + builder.append(result.getPostalCode()).append(" "); } - mProgressDialog.dismiss(); + builder.append(result.getCity()); + if (needCountry) { + String country = result.getCountry() != null + ? result.getCountry() : result.getCountryId(); + builder.append(" (").append(country).append(")"); + } + items[i] = builder.toString(); } + return items; + } - private void handleResultDisambiguation(final List<LocationResult> results) { - CharSequence[] items = buildItemList(results); - new AlertDialog.Builder(getContext()) - .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - applyLocation(results.get(which)); - dialog.dismiss(); - } - }) - .setNegativeButton(android.R.string.cancel, null) - .setTitle(R.string.weather_select_location) - .show(); + private void applyLocation(final WeatherLocation result) { + if (Preferences.setCustomWeatherLocation(getContext(), result)) { + String cityName = result.getCity(); + String state = result.getState(); + String country = result.getCountry(); + setText(cityName + "," + state + "/" + country); } + final AlertDialog d = (AlertDialog) getDialog(); + d.dismiss(); + } - private CharSequence[] buildItemList(List<LocationResult> results) { - boolean needCountry = false, needPostal = false; - String countryId = results.get(0).countryId; - HashSet<String> postalIds = new HashSet<String>(); - - for (LocationResult result : results) { - if (!TextUtils.equals(result.countryId, countryId)) { - needCountry = true; - } - String postalId = result.countryId + "##" + result.city; - if (postalIds.contains(postalId)) { - needPostal = true; - } - postalIds.add(postalId); - if (needPostal && needCountry) { - break; - } - } - - int count = results.size(); - CharSequence[] items = new CharSequence[count]; - for (int i = 0; i < count; i++) { - LocationResult result = results.get(i); - StringBuilder builder = new StringBuilder(); - if (needPostal && result.postal != null) { - builder.append(result.postal).append(" "); - } - builder.append(result.city); - if (needCountry) { - String country = result.country != null - ? result.country : result.countryId; - builder.append(" (").append(country).append(")"); + @Override + public void onLookupCityRequestCompleted(int status, final List<WeatherLocation> locations) { + mHandler.post(new Runnable() { + @Override + public void run() { + final Context context = getContext(); + if (locations == null || locations.isEmpty()) { + Toast.makeText(context, + context.getString(R.string.weather_retrieve_location_dialog_title), + Toast.LENGTH_SHORT) + .show(); + } else if (locations.size() > 1) { + handleResultDisambiguation(locations); + } else { + applyLocation(locations.get(0)); } - items[i] = builder.toString(); + mProgressDialog.dismiss(); } - return items; - } - - private void applyLocation(final LocationResult result) { - Preferences.setCustomWeatherLocationId(getContext(), result.id); - setText(result.city); - mDialog.dismiss(); - } + }); } } diff --git a/src/com/cyanogenmod/lockclock/preference/Preferences.java b/src/com/cyanogenmod/lockclock/preference/Preferences.java index a138c75..dc70081 100644 --- a/src/com/cyanogenmod/lockclock/preference/Preferences.java +++ b/src/com/cyanogenmod/lockclock/preference/Preferences.java @@ -25,6 +25,7 @@ import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import com.cyanogenmod.lockclock.R; +import com.cyanogenmod.lockclock.weather.Utils; import java.util.List; @@ -37,6 +38,15 @@ public class Preferences extends PreferenceActivity { public void onBuildHeaders(List<Header> target) { loadHeadersFromResource(R.xml.preferences_headers, target); + if (!Utils.isWeatherServiceAvailable(this)) { + for (Header header : target) { + if (header.titleRes == R.string.weather_category) { + target.remove(header); + break; + } + } + } + // Check if triggered from adding a new widget Intent intent = getIntent(); if (intent != null diff --git a/src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java b/src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java index 1a42a20..0824a4b 100644 --- a/src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java +++ b/src/com/cyanogenmod/lockclock/preference/WeatherPreferences.java @@ -19,7 +19,6 @@ package com.cyanogenmod.lockclock.preference; import android.Manifest; import android.app.AlertDialog; import android.app.Dialog; -import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -31,31 +30,24 @@ import android.preference.EditTextPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceFragment; +import android.preference.PreferenceScreen; import android.preference.SwitchPreference; import android.provider.Settings; import android.text.TextUtils; import android.util.Log; - import com.cyanogenmod.lockclock.ClockWidgetProvider; import com.cyanogenmod.lockclock.R; import com.cyanogenmod.lockclock.misc.Constants; import com.cyanogenmod.lockclock.misc.Preferences; import com.cyanogenmod.lockclock.weather.WeatherUpdateService; +import cyanogenmod.weather.CMWeatherManager; public class WeatherPreferences extends PreferenceFragment implements - SharedPreferences.OnSharedPreferenceChangeListener, Preference.OnPreferenceChangeListener { + SharedPreferences.OnSharedPreferenceChangeListener, Preference.OnPreferenceChangeListener, + CMWeatherManager.WeatherServiceProviderChangeListener { private static final String TAG = "WeatherPreferences"; private static final int LOCATION_PERMISSION_REQUEST_CODE = 1; - private static final String[] LOCATION_PREF_KEYS = new String[] { - Constants.WEATHER_USE_CUSTOM_LOCATION, - Constants.WEATHER_CUSTOM_LOCATION_CITY - }; - private static final String[] WEATHER_REFRESH_KEYS = new String[] { - Constants.SHOW_WEATHER, - Constants.WEATHER_REFRESH_INTERVAL - }; - private SwitchPreference mUseCustomLoc; private EditTextPreference mCustomWeatherLoc; private ListPreference mFontColor; @@ -65,8 +57,8 @@ public class WeatherPreferences extends PreferenceFragment implements private SwitchPreference mUseCustomlocation; private SwitchPreference mShowWeather; private Context mContext; - private ContentResolver mResolver; private Runnable mPostResumeRunnable; + private PreferenceScreen mWeatherSource; @Override public void onCreate(Bundle savedInstanceState) { @@ -74,7 +66,6 @@ public class WeatherPreferences extends PreferenceFragment implements getPreferenceManager().setSharedPreferencesName(Constants.PREF_NAME); addPreferencesFromResource(R.xml.preferences_weather); mContext = getActivity(); - mResolver = mContext.getContentResolver(); // Load items that need custom summaries etc. mUseCustomLoc = (SwitchPreference) findPreference(Constants.WEATHER_USE_CUSTOM_LOCATION); @@ -84,6 +75,18 @@ public class WeatherPreferences extends PreferenceFragment implements mIconSet = (IconSelectionPreference) findPreference(Constants.WEATHER_ICONS); mUseMetric = (SwitchPreference) findPreference(Constants.WEATHER_USE_METRIC); mUseCustomlocation = (SwitchPreference) findPreference(Constants.WEATHER_USE_CUSTOM_LOCATION); + mWeatherSource = (PreferenceScreen) findPreference(Constants.WEATHER_SOURCE); + mWeatherSource.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { + @Override + public boolean onPreferenceChange(Preference preference, Object o) { + if (Preferences.getWeatherSource(mContext) != null && mShowWeather.isChecked()) { + mWeatherSource.notifyDependencyChange(false); + } else { + mWeatherSource.notifyDependencyChange(true); + } + return false; + } + }); mShowWeather = (SwitchPreference) findPreference(Constants.SHOW_WEATHER); mShowWeather.setOnPreferenceChangeListener(this); @@ -116,15 +119,34 @@ public class WeatherPreferences extends PreferenceFragment implements mPostResumeRunnable = null; } + final CMWeatherManager weatherManager = CMWeatherManager.getInstance(mContext); + weatherManager.registerWeatherServiceProviderChangeListener(this); + + mWeatherSource.setEnabled(mShowWeather.isChecked()); + updateLocationSummary(); updateFontColorsSummary(); updateIconSetSummary(); + updateWeatherProviderSummary(getWeatherProviderName()); } @Override public void onPause() { super.onPause(); getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this); + final CMWeatherManager weatherManager = CMWeatherManager.getInstance(mContext); + weatherManager.unregisterWeatherServiceProviderChangeListener(this); + } + + @Override + public void onDestroy() { + super.onDestroy(); + if (mUseCustomlocation.isChecked() + && Preferences.getCustomWeatherLocationCity(mContext) == null) { + //The user decided to toggle the custom location switch, but forgot to set a custom + //location, we need to go back to geo location + Preferences.setUseCustomWeatherLocation(mContext, false); + } } @Override @@ -152,18 +174,24 @@ public class WeatherPreferences extends PreferenceFragment implements forceWeatherUpdate = true; } - // If the weather source has changes, invalidate the custom location settings and change - // back to GeoLocation to force the user to specify a new custom location if needed if (TextUtils.equals(key, Constants.WEATHER_SOURCE)) { - Preferences.setCustomWeatherLocationId(mContext, null); + // The weather source changed, invalidate the custom location settings and change + // back to GeoLocation to force the user to specify a new custom location if needed Preferences.setCustomWeatherLocationCity(mContext, null); + Preferences.setCustomWeatherLocation(mContext, null); Preferences.setUseCustomWeatherLocation(mContext, false); mUseCustomlocation.setChecked(false); updateLocationSummary(); } - if (key.equals(Constants.WEATHER_USE_CUSTOM_LOCATION) - || key.equals(Constants.WEATHER_CUSTOM_LOCATION_CITY)) { + if (key.equals(Constants.WEATHER_USE_CUSTOM_LOCATION)) { + if (!mUseCustomLoc.isChecked() || (mUseCustomLoc.isChecked() && + Preferences.getCustomWeatherLocation(mContext) != null)) { + forceWeatherUpdate = true; + } + } + + if (key.equals(Constants.WEATHER_CUSTOM_LOCATION_CITY) && mUseCustomLoc.isChecked()) { forceWeatherUpdate = true; } @@ -171,6 +199,15 @@ public class WeatherPreferences extends PreferenceFragment implements needWeatherUpdate = true; } + if (key.equals(Constants.SHOW_WEATHER)) { + mWeatherSource.setEnabled(mShowWeather.isChecked()); + if (Preferences.getWeatherSource(mContext) != null && mShowWeather.isChecked()) { + mWeatherSource.notifyDependencyChange(false); + } else { + mWeatherSource.notifyDependencyChange(true); + } + } + if (Constants.DEBUG) { Log.v(TAG, "Preference " + key + " changed, need update " + needWeatherUpdate + " force update " + forceWeatherUpdate); @@ -199,7 +236,7 @@ public class WeatherPreferences extends PreferenceFragment implements private void updateLocationSummary() { if (mUseCustomLoc.isChecked()) { - String location = Preferences.customWeatherLocationCity(mContext); + String location = Preferences.getCustomWeatherLocationCity(mContext); if (location == null) { location = getResources().getString(R.string.unknown); } @@ -274,4 +311,30 @@ public class WeatherPreferences extends PreferenceFragment implements } return true; } + + @Override + public void onWeatherServiceProviderChanged(String providerName) { + updateWeatherProviderSummary(providerName); + } + + private void updateWeatherProviderSummary(String providerName) { + if (providerName != null) { + mWeatherSource.setSummary(providerName); + Preferences.setWeatherSource(mContext, providerName); + } else { + mWeatherSource.setSummary(R.string.weather_source_not_selected); + Preferences.setWeatherSource(mContext, null); + } + + if (providerName != null && mShowWeather.isChecked()) { + mWeatherSource.notifyDependencyChange(false); + } else { + mWeatherSource.notifyDependencyChange(true); + } + } + + private String getWeatherProviderName() { + final CMWeatherManager weatherManager = CMWeatherManager.getInstance(mContext); + return weatherManager.getActiveWeatherServiceProviderLabel(); + } } diff --git a/src/com/cyanogenmod/lockclock/weather/ForecastActivity.java b/src/com/cyanogenmod/lockclock/weather/ForecastActivity.java index b08a069..70fe61c 100644 --- a/src/com/cyanogenmod/lockclock/weather/ForecastActivity.java +++ b/src/com/cyanogenmod/lockclock/weather/ForecastActivity.java @@ -18,13 +18,10 @@ package com.cyanogenmod.lockclock.weather; import android.annotation.SuppressLint; import android.app.Activity; -import android.app.KeyguardManager; -import android.app.WallpaperManager; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import android.graphics.drawable.Drawable; import android.os.Bundle; import android.util.Log; import android.view.View; @@ -35,11 +32,10 @@ import android.view.animation.Animation; import android.view.animation.LinearInterpolator; import android.view.animation.RotateAnimation; import android.widget.ImageView; - -import com.cyanogenmod.lockclock.misc.Constants; +import com.cyanogenmod.lockclock.R; import com.cyanogenmod.lockclock.misc.Preferences; import com.cyanogenmod.lockclock.misc.WidgetUtils; -import com.cyanogenmod.lockclock.R; +import cyanogenmod.weather.WeatherInfo; public class ForecastActivity extends Activity implements OnClickListener { private static final String TAG = "ForecastActivity"; diff --git a/src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java b/src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java index 6f8da53..ed52688 100644 --- a/src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java +++ b/src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java @@ -16,29 +16,34 @@ package com.cyanogenmod.lockclock.weather; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.Locale; -import java.util.TimeZone; - import android.annotation.SuppressLint; import android.content.Context; +import android.graphics.Color; import android.text.format.DateFormat; import android.util.Log; import android.view.LayoutInflater; import android.view.View; -import android.webkit.WebView; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; - +import com.cyanogenmod.lockclock.R; import com.cyanogenmod.lockclock.misc.IconUtils; import com.cyanogenmod.lockclock.misc.Preferences; -import com.cyanogenmod.lockclock.misc.WidgetUtils; -import com.cyanogenmod.lockclock.weather.WeatherInfo.DayForecast; -import com.cyanogenmod.lockclock.R; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.WindSpeedUnit.MPH; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.WindSpeedUnit.KPH; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.TempUnit.FAHRENHEIT; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.TempUnit.CELSIUS; +import cyanogenmod.weather.CMWeatherManager; +import cyanogenmod.weather.WeatherInfo; +import cyanogenmod.weather.WeatherInfo.DayForecast; +import cyanogenmod.weather.util.WeatherUtils; + +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.Locale; +import java.util.TimeZone; public class ForecastBuilder { private static final String TAG = "ForecastBuilder"; @@ -58,45 +63,82 @@ public class ForecastBuilder { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); int color = Preferences.weatherFontColor(context); boolean invertLowHigh = Preferences.invertLowHighTemperature(context); + final boolean useMetric = Preferences.useMetricUnits(context); + + //Make any conversion needed in case the data was not provided in the desired unit + double temp = w.getTemperature(); + double todaysLow = w.getTodaysLow(); + double todaysHigh = w.getTodaysHigh(); + int tempUnit = w.getTemperatureUnit(); + if (tempUnit == FAHRENHEIT && useMetric) { + temp = WeatherUtils.fahrenheitToCelsius(temp); + todaysLow = WeatherUtils.fahrenheitToCelsius(todaysLow); + todaysHigh = WeatherUtils.fahrenheitToCelsius(todaysHigh); + tempUnit = CELSIUS; + } else if (tempUnit == CELSIUS && !useMetric) { + temp = WeatherUtils.celsiusToFahrenheit(temp); + todaysLow = WeatherUtils.celsiusToFahrenheit(todaysLow); + todaysHigh = WeatherUtils.celsiusToFahrenheit(todaysHigh); + tempUnit = FAHRENHEIT; + } + + double windSpeed = w.getWindSpeed(); + int windSpeedUnit = w.getWindSpeedUnit(); + if (windSpeedUnit == MPH && useMetric) { + windSpeedUnit = KPH; + windSpeed = Utils.milesToKilometers(windSpeed); + } else if (windSpeedUnit == KPH && !useMetric) { + windSpeedUnit = MPH; + windSpeed = Utils.kilometersToMiles(windSpeed); + } View view = inflater.inflate(resourceId, null); // Set the weather source TextView weatherSource = (TextView) view.findViewById(R.id.weather_source); - weatherSource.setText(Preferences.weatherProvider(context).getNameResourceId()); + final CMWeatherManager cmWeatherManager = CMWeatherManager.getInstance(context); + String activeWeatherLabel = cmWeatherManager.getActiveWeatherServiceProviderLabel(); + weatherSource.setText(activeWeatherLabel != null ? activeWeatherLabel : ""); // Set the current conditions // Weather Image ImageView weatherImage = (ImageView) view.findViewById(R.id.weather_image); String iconsSet = Preferences.getWeatherIconSet(context); - weatherImage.setImageBitmap(w.getConditionBitmap(iconsSet, color, - IconUtils.getNextHigherDensity(context))); + weatherImage.setImageBitmap(IconUtils.getWeatherIconBitmap(context, iconsSet, color, + w.getConditionCode(), IconUtils.getNextHigherDensity(context))); // Weather Condition TextView weatherCondition = (TextView) view.findViewById(R.id.weather_condition); - weatherCondition.setText(w.getCondition()); + weatherCondition.setText(Utils.resolveWeatherCondition(context, w.getConditionCode())); // Weather Temps TextView weatherTemp = (TextView) view.findViewById(R.id.weather_temp); - weatherTemp.setText(w.getFormattedTemperature()); + weatherTemp.setText(WeatherUtils.formatTemperature(temp, tempUnit)); + + // Humidity and Wind + TextView weatherHumWind = (TextView) view.findViewById(R.id.weather_hum_wind); + weatherHumWind.setText(Utils.formatHumidity(w.getHumidity()) + ", " + + Utils.formatWindSpeed(context, windSpeed, windSpeedUnit) + " " + + Utils.resolveWindDirection(context, w.getWindDirection())); // City TextView city = (TextView) view.findViewById(R.id.weather_city); city.setText(w.getCity()); // Weather Update Time - Date lastUpdate = w.getTimestamp(); + Date lastUpdate = new Date(w.getTimestamp()); StringBuilder sb = new StringBuilder(); sb.append(DateFormat.format("E", lastUpdate)); sb.append(" "); sb.append(DateFormat.getTimeFormat(context).format(lastUpdate)); TextView updateTime = (TextView) view.findViewById(R.id.update_time); updateTime.setText(sb.toString()); - updateTime.setVisibility(Preferences.showWeatherTimestamp(context) ? View.VISIBLE : View.GONE); + updateTime.setVisibility( + Preferences.showWeatherTimestamp(context) ? View.VISIBLE : View.GONE); // Weather Temps Panel additional items - final String low = w.getFormattedLow(); - final String high = w.getFormattedHigh(); + final String low = WeatherUtils.formatTemperature(todaysLow, tempUnit); + final String high = WeatherUtils.formatTemperature(todaysHigh, tempUnit); TextView weatherLowHigh = (TextView) view.findViewById(R.id.weather_low_high); weatherLowHigh.setText(invertLowHigh ? high + " | " + low : low + " | " + high); @@ -108,6 +150,9 @@ public class ForecastBuilder { if (buildSmallPanel(context, forecastView, w)) { // Success, hide the progress container progressIndicator.setVisibility(View.GONE); + } else { + // TODO: Display a text notifying the user that the forecast data is not available + // rather than keeping the indicator spinning forever } return view; @@ -120,55 +165,85 @@ public class ForecastBuilder { * @param w = the Weather info object that contains the forecast data */ public static boolean buildSmallPanel(Context context, LinearLayout smallPanel, WeatherInfo w) { - if (smallPanel == null) { + if (smallPanel == null) { Log.d(TAG, "Invalid view passed"); return false; - } + } - // Get things ready - LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - int color = Preferences.weatherFontColor(context); - boolean invertLowHigh = Preferences.invertLowHighTemperature(context); + // Get things ready + LayoutInflater inflater + = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + int color = Preferences.weatherFontColor(context); + boolean invertLowHigh = Preferences.invertLowHighTemperature(context); + final boolean useMetric = Preferences.useMetricUnits(context); - ArrayList<DayForecast> forecasts = w.getForecasts(); - if (forecasts == null || forecasts.size() <= 1) { + List<DayForecast> forecasts = w.getForecasts(); + if (forecasts == null || forecasts.size() <= 1) { smallPanel.setVisibility(View.GONE); return false; - } - - TimeZone MyTimezone = TimeZone.getDefault(); - Calendar calendar = new GregorianCalendar(MyTimezone); - - // Iterate through the forecasts - for (DayForecast d : forecasts) { - // Load the views - View forecastItem = inflater.inflate(R.layout.forecast_item, null); - - // The day of the week - TextView day = (TextView) forecastItem.findViewById(R.id.forecast_day); - day.setText(calendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT, Locale.getDefault())); - calendar.roll(Calendar.DAY_OF_WEEK, true); - - // Weather Image - ImageView image = (ImageView) forecastItem.findViewById(R.id.weather_image); - String iconsSet = Preferences.getWeatherIconSet(context); - int resId = d.getConditionResource(context, iconsSet); - if (resId != 0) { + } + + TimeZone MyTimezone = TimeZone.getDefault(); + Calendar calendar = new GregorianCalendar(MyTimezone); + int weatherTempUnit = w.getTemperatureUnit(); + int numForecasts = forecasts.size(); + int itemSidePadding = context.getResources().getDimensionPixelSize( + R.dimen.forecast_item_padding_side); + + // Iterate through the Forecasts + for (int count = 0; count < numForecasts; count ++) { + DayForecast d = forecasts.get(count); + + // Load the views + View forecastItem = inflater.inflate(R.layout.forecast_item, null); + + // The day of the week + TextView day = (TextView) forecastItem.findViewById(R.id.forecast_day); + day.setText(calendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT, + Locale.getDefault())); + calendar.roll(Calendar.DAY_OF_WEEK, true); + + // Weather Image + ImageView image = (ImageView) forecastItem.findViewById(R.id.weather_image); + String iconsSet = Preferences.getWeatherIconSet(context); + final int resId = IconUtils.getWeatherIconResource(context, iconsSet, + d.getConditionCode()); + if (resId != 0) { image.setImageResource(resId); - } else { - image.setImageBitmap(d.getConditionBitmap(context, iconsSet, color)); - } - - // Temperatures - String dayLow = d.getFormattedLow(); - String dayHigh = d.getFormattedHigh(); - TextView temps = (TextView) forecastItem.findViewById(R.id.weather_temps); - temps.setText(invertLowHigh ? dayHigh + " " + dayLow : dayLow + " " + dayHigh); - - // Add the view - smallPanel.addView(forecastItem, + } else { + image.setImageBitmap(IconUtils.getWeatherIconBitmap(context, iconsSet, + color, d.getConditionCode())); + } + + // Temperatures + double lowTemp = d.getLow(); + double highTemp = d.getHigh(); + int tempUnit = weatherTempUnit; + if (weatherTempUnit == FAHRENHEIT && useMetric) { + lowTemp = WeatherUtils.fahrenheitToCelsius(lowTemp); + highTemp = WeatherUtils.fahrenheitToCelsius(highTemp); + tempUnit = CELSIUS; + } else if (weatherTempUnit == CELSIUS && !useMetric) { + lowTemp = WeatherUtils.celsiusToFahrenheit(lowTemp); + highTemp = WeatherUtils.celsiusToFahrenheit(highTemp); + tempUnit = FAHRENHEIT; + } + String dayLow = WeatherUtils.formatTemperature(lowTemp, tempUnit); + String dayHigh = WeatherUtils.formatTemperature(highTemp, tempUnit); + TextView temps = (TextView) forecastItem.findViewById(R.id.weather_temps); + temps.setText(invertLowHigh ? dayHigh + " " + dayLow : dayLow + " " + dayHigh); + + // Add the view + smallPanel.addView(forecastItem, new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1)); - } - return true; + + // Add a divider to the right for all but the last view + if (count < numForecasts - 1) { + View divider = new View(context); + smallPanel.addView(divider, new LinearLayout.LayoutParams( + itemSidePadding, LinearLayout.LayoutParams.MATCH_PARENT)); + } + } + return true; } } diff --git a/src/com/cyanogenmod/lockclock/weather/HttpRetriever.java b/src/com/cyanogenmod/lockclock/weather/HttpRetriever.java deleted file mode 100755 index 60723fa..0000000 --- a/src/com/cyanogenmod/lockclock/weather/HttpRetriever.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2013 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.cyanogenmod.lockclock.weather; - -import android.util.Log; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.util.EntityUtils; - -import java.io.IOException; - -public class HttpRetriever { - private static final String TAG = "HttpRetriever"; - - public static String retrieve(String url) { - HttpGet request = new HttpGet(url); - try { - HttpResponse response = new DefaultHttpClient().execute(request); - HttpEntity entity = response.getEntity(); - if (entity != null) { - return EntityUtils.toString(entity); - } - } catch (IOException e) { - Log.e(TAG, "Couldn't retrieve data from url " + url, e); - } - return null; - } -} diff --git a/src/com/cyanogenmod/lockclock/weather/OpenWeatherMapProvider.java b/src/com/cyanogenmod/lockclock/weather/OpenWeatherMapProvider.java deleted file mode 100644 index ee2f46f..0000000 --- a/src/com/cyanogenmod/lockclock/weather/OpenWeatherMapProvider.java +++ /dev/null @@ -1,330 +0,0 @@ -package com.cyanogenmod.lockclock.weather; - -import java.util.*; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import android.content.Context; -import android.location.Location; -import android.net.Uri; -import android.util.Log; - -import com.cyanogenmod.lockclock.weather.WeatherInfo.DayForecast; -import com.cyanogenmod.lockclock.R; - -public class OpenWeatherMapProvider implements WeatherProvider { - private static final String TAG = "OpenWeatherMapProvider"; - - private static final int FORECAST_DAYS = 5; - private static final String SELECTION_LOCATION = "lat=%f&lon=%f"; - private static final String SELECTION_ID = "id=%s"; - private static final String APP_ID = "e2b075d68c39dc43e16995653fcd6fd0"; - - private static final String URL_LOCATION = - "http://api.openweathermap.org/data/2.5/find?q=%s&mode=json&lang=%s&appid=" - + APP_ID; - private static final String URL_WEATHER = - "http://api.openweathermap.org/data/2.5/weather?%s&mode=json&units=%s&lang=%s&appid=" - + APP_ID; - private static final String URL_FORECAST = - "http://api.openweathermap.org/data/2.5/forecast/daily?" + - "%s&mode=json&units=%s&lang=%s&cnt=" + FORECAST_DAYS + "&appid=" + APP_ID; - - private Context mContext; - - public OpenWeatherMapProvider(Context context) { - mContext = context; - } - - @Override - public int getNameResourceId() { - return R.string.weather_source_openweathermap; - } - - @Override - public List<LocationResult> getLocations(String input) { - String url = String.format(URL_LOCATION, Uri.encode(input), getLanguageCode()); - String response = HttpRetriever.retrieve(url); - if (response == null) { - return null; - } - - if (Log.isLoggable(TAG, Log.VERBOSE)) { - Log.v(TAG, "URL = " + url + " returning a response of " + response); - } - - try { - JSONArray jsonResults = new JSONObject(response).getJSONArray("list"); - ArrayList<LocationResult> results = new ArrayList<LocationResult>(); - int count = jsonResults.length(); - - for (int i = 0; i < count; i++) { - JSONObject result = jsonResults.getJSONObject(i); - LocationResult location = new LocationResult(); - - location.id = result.getString("id"); - location.city = result.getString("name"); - location.countryId = result.getJSONObject("sys").getString("country"); - results.add(location); - } - - return results; - } catch (JSONException e) { - Log.w(TAG, "Received malformed location data (input=" + input + ")", e); - } - - return null; - } - - public WeatherInfo getWeatherInfo(String id, String localizedCityName, boolean metric) { - String selection = String.format(Locale.US, SELECTION_ID, id); - return handleWeatherRequest(selection, localizedCityName, metric); - } - - public WeatherInfo getWeatherInfo(Location location, boolean metric) { - String selection = String.format(Locale.US, SELECTION_LOCATION, - location.getLatitude(), location.getLongitude()); - return handleWeatherRequest(selection, null, metric); - } - - private WeatherInfo handleWeatherRequest(String selection, - String localizedCityName, boolean metric) { - String units = metric ? "metric" : "imperial"; - String locale = getLanguageCode(); - String conditionUrl = String.format(Locale.US, URL_WEATHER, selection, units, locale); - String conditionResponse = HttpRetriever.retrieve(conditionUrl); - if (conditionResponse == null) { - return null; - } - - String forecastUrl = String.format(Locale.US, URL_FORECAST, selection, units, locale); - String forecastResponse = HttpRetriever.retrieve(forecastUrl); - if (forecastResponse == null) { - return null; - } - - if (Log.isLoggable(TAG, Log.VERBOSE)) { - Log.v(TAG, "URL = " + conditionUrl + " returning a response of " + conditionResponse); - } - - try { - JSONObject conditions = new JSONObject(conditionResponse); - JSONObject weather = conditions.getJSONArray("weather").getJSONObject(0); - JSONObject conditionData = conditions.getJSONObject("main"); - JSONObject windData = conditions.getJSONObject("wind"); - ArrayList<DayForecast> forecasts = - parseForecasts(new JSONObject(forecastResponse).getJSONArray("list"), metric); - int speedUnitResId = metric ? R.string.weather_kph : R.string.weather_mph; - if (localizedCityName == null) { - localizedCityName = conditions.getString("name"); - } - - WeatherInfo w = new WeatherInfo(mContext, conditions.getString("id"), localizedCityName, - /* condition */ weather.getString("main"), - /* conditionCode */ mapConditionIconToCode( - weather.getString("icon"), weather.getInt("id")), - /* temperature */ sanitizeTemperature(conditionData.getDouble("temp"), metric), - /* tempUnit */ metric ? "C" : "F", - /* humidity */ (float) conditionData.getDouble("humidity"), - /* wind */ (float) windData.getDouble("speed"), - /* windDir */ windData.getInt("deg"), - /* speedUnit */ mContext.getString(speedUnitResId), - forecasts, - System.currentTimeMillis()); - - Log.d(TAG, "Weather updated: " + w); - return w; - } catch (JSONException e) { - Log.w(TAG, "Received malformed weather data (selection = " + selection - + ", lang = " + locale + ")", e); - } - - return null; - } - - private ArrayList<DayForecast> parseForecasts(JSONArray forecasts, boolean metric) throws JSONException { - ArrayList<DayForecast> result = new ArrayList<DayForecast>(); - int count = forecasts.length(); - - if (count == 0) { - throw new JSONException("Empty forecasts array"); - } - for (int i = 0; i < count; i++) { - JSONObject forecast = forecasts.getJSONObject(i); - JSONObject temperature = forecast.getJSONObject("temp"); - JSONObject data = forecast.getJSONArray("weather").getJSONObject(0); - DayForecast item = new DayForecast( - /* low */ sanitizeTemperature(temperature.getDouble("min"), metric), - /* high */ sanitizeTemperature(temperature.getDouble("max"), metric), - /* condition */ data.getString("main"), - /* conditionCode */ mapConditionIconToCode( - data.getString("icon"), data.getInt("id"))); - result.add(item); - } - - return result; - } - - // OpenWeatherMap sometimes returns temperatures in Kelvin even if we ask it - // for deg C or deg F. Detect this and convert accordingly. - private static float sanitizeTemperature(double value, boolean metric) { - // threshold chosen to work for both C and F. 170 deg F is hotter - // than the hottest place on earth. - if (value > 170) { - // K -> deg C - value -= 273.15; - if (!metric) { - // deg C -> deg F - value = (value * 1.8) + 32; - } - } - return (float) value; - } - - private static final HashMap<String, Integer> ICON_MAPPING = new HashMap<String, Integer>(); - static { - ICON_MAPPING.put("01d", 32); - ICON_MAPPING.put("01n", 31); - ICON_MAPPING.put("02d", 30); - ICON_MAPPING.put("02n", 29); - ICON_MAPPING.put("03d", 26); - ICON_MAPPING.put("03n", 26); - ICON_MAPPING.put("04d", 28); - ICON_MAPPING.put("04n", 27); - ICON_MAPPING.put("09d", 12); - ICON_MAPPING.put("09n", 11); - ICON_MAPPING.put("10d", 40); - ICON_MAPPING.put("10n", 45); - ICON_MAPPING.put("11d", 4); - ICON_MAPPING.put("11n", 4); - ICON_MAPPING.put("13d", 16); - ICON_MAPPING.put("13n", 16); - ICON_MAPPING.put("50d", 21); - ICON_MAPPING.put("50n", 20); - } - - private int mapConditionIconToCode(String icon, int conditionId) { - - // First, use condition ID for specific cases - switch (conditionId) { - // Thunderstorms - case 202: // thunderstorm with heavy rain - case 232: // thunderstorm with heavy drizzle - case 211: // thunderstorm - return 4; - case 212: // heavy thunderstorm - return 3; - case 221: // ragged thunderstorm - case 231: // thunderstorm with drizzle - case 201: // thunderstorm with rain - return 38; - case 230: // thunderstorm with light drizzle - case 200: // thunderstorm with light rain - case 210: // light thunderstorm - return 37; - - // Drizzle - case 300: // light intensity drizzle - case 301: // drizzle - case 302: // heavy intensity drizzle - case 310: // light intensity drizzle rain - case 311: // drizzle rain - case 312: // heavy intensity drizzle rain - case 313: // shower rain and drizzle - case 314: // heavy shower rain and drizzle - case 321: // shower drizzle - return 9; - - // Rain - case 500: // light rain - case 501: // moderate rain - case 520: // light intensity shower rain - case 521: // shower rain - case 531: // ragged shower rain - return 11; - case 502: // heavy intensity rain - case 503: // very heavy rain - case 504: // extreme rain - case 522: // heavy intensity shower rain - return 12; - case 511: // freezing rain - return 10; - - // Snow - case 600: case 620: return 14; // light snow - case 601: case 621: return 16; // snow - case 602: case 622: return 41; // heavy snow - case 611: case 612: return 18; // sleet - case 615: case 616: return 5; // rain and snow - - // Atmosphere - case 741: // fog - return 20; - case 711: // smoke - case 762: // volcanic ash - return 22; - case 701: // mist - case 721: // haze - return 21; - case 731: // sand/dust whirls - case 751: // sand - case 761: // dust - return 19; - case 771: // squalls - return 23; - case 781: // tornado - return 0; - - // Extreme - case 900: return 0; // tornado - case 901: return 1; // tropical storm - case 902: return 2; // hurricane - case 903: return 25; // cold - case 904: return 36; // hot - case 905: return 24; // windy - case 906: return 17; // hail - } - - // Not yet handled - Use generic icon mapping - Integer condition = ICON_MAPPING.get(icon); - if (condition != null) { - return condition; - } - - return -1; - } - - private static final HashMap<String, String> LANGUAGE_CODE_MAPPING = new HashMap<String, String>(); - static { - LANGUAGE_CODE_MAPPING.put("bg-", "bg"); - LANGUAGE_CODE_MAPPING.put("de-", "de"); - LANGUAGE_CODE_MAPPING.put("es-", "sp"); - LANGUAGE_CODE_MAPPING.put("fi-", "fi"); - LANGUAGE_CODE_MAPPING.put("fr-", "fr"); - LANGUAGE_CODE_MAPPING.put("it-", "it"); - LANGUAGE_CODE_MAPPING.put("nl-", "nl"); - LANGUAGE_CODE_MAPPING.put("pl-", "pl"); - LANGUAGE_CODE_MAPPING.put("pt-", "pt"); - LANGUAGE_CODE_MAPPING.put("ro-", "ro"); - LANGUAGE_CODE_MAPPING.put("ru-", "ru"); - LANGUAGE_CODE_MAPPING.put("se-", "se"); - LANGUAGE_CODE_MAPPING.put("tr-", "tr"); - LANGUAGE_CODE_MAPPING.put("uk-", "ua"); - LANGUAGE_CODE_MAPPING.put("zh-CN", "zh_cn"); - LANGUAGE_CODE_MAPPING.put("zh-TW", "zh_tw"); - } - private String getLanguageCode() { - Locale locale = mContext.getResources().getConfiguration().locale; - String selector = locale.getLanguage() + "-" + locale.getCountry(); - - for (Map.Entry<String, String> entry : LANGUAGE_CODE_MAPPING.entrySet()) { - if (selector.startsWith(entry.getKey())) { - return entry.getValue(); - } - } - - return "en"; - } -} diff --git a/src/com/cyanogenmod/lockclock/weather/Utils.java b/src/com/cyanogenmod/lockclock/weather/Utils.java new file mode 100644 index 0000000..602fdd9 --- /dev/null +++ b/src/com/cyanogenmod/lockclock/weather/Utils.java @@ -0,0 +1,199 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.cyanogenmod.lockclock.weather; + +import android.content.Context; +import android.content.res.Resources; +import com.cyanogenmod.lockclock.R; +import cyanogenmod.app.CMContextConstants; +import cyanogenmod.providers.WeatherContract; + +import static cyanogenmod.providers.WeatherContract.WeatherColumns.WeatherCode.NOT_AVAILABLE; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.WeatherCode.SCATTERED_THUNDERSTORMS; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.WeatherCode.SCATTERED_SNOW_SHOWERS; +import static cyanogenmod.providers.WeatherContract.WeatherColumns.WeatherCode.ISOLATED_THUNDERSHOWERS; + +import java.text.DecimalFormat; + +public final class Utils { + + private static final DecimalFormat sNoDigitsFormat = new DecimalFormat("0"); + + // In doubt? See https://en.wikipedia.org/wiki/Points_of_the_compass + private static final double DIRECTION_NORTH = 23d; + private static final double DIRECTION_NORTH_EAST = 68d; + private static final double DIRECTION_EAST = 113d; + private static final double DIRECTION_SOUTH_EAST = 158d; + private static final double DIRECTION_SOUTH = 203d; + private static final double DIRECTION_SOUTH_WEST = 248d; + private static final double DIRECTION_WEST = 293d; + private static final double DIRECTION_NORTH_WEST = 338d; + + private static boolean weatherServiceFeatureCached; + private static boolean weatherServiceAvailable; + + /** + * Returns a localized string of the wind direction + * @param context Application context to access resources + * @param windDirection The wind direction in degrees + * @return + */ + public static String resolveWindDirection(Context context, double windDirection) { + int resId; + + if (windDirection < 0) { + resId = R.string.unknown; + } else if (windDirection < DIRECTION_NORTH) { + resId = R.string.weather_N; + } else if (windDirection < DIRECTION_NORTH_EAST) { + resId = R.string.weather_NE; + } else if (windDirection < DIRECTION_EAST) { + resId = R.string.weather_E; + } else if (windDirection < DIRECTION_SOUTH_EAST) { + resId = R.string.weather_SE; + } else if (windDirection < DIRECTION_SOUTH) { + resId = R.string.weather_S; + } else if (windDirection < DIRECTION_SOUTH_WEST) { + resId = R.string.weather_SW; + } else if (windDirection < DIRECTION_WEST) { + resId = R.string.weather_W; + } else if (windDirection < DIRECTION_NORTH_WEST) { + resId = R.string.weather_NW; + } else { + resId = R.string.weather_N; + } + + return context.getString(resId); + } + + /** + * Returns the resource name associated to the supplied weather condition code + * @param context Application context to access resources + * @param conditionCode The weather condition code + * @return The resource name if a valid condition code is passed, empty string otherwise + */ + public static String resolveWeatherCondition(Context context, int conditionCode) { + final Resources res = context.getResources(); + final int resId = res.getIdentifier("weather_" + + Utils.addOffsetToConditionCodeFromWeatherContract(conditionCode), "string", + context.getPackageName()); + if (resId != 0) { + return res.getString(resId); + } + return ""; + } + + private static String getFormattedValue(double value, String unit) { + if (Double.isNaN(value)) { + return "-"; + } + String formatted = sNoDigitsFormat.format(value); + if (formatted.equals("-0")) { + formatted = "0"; + } + return formatted + unit; + } + + /** + * Returns a string with the format xx% (where xx is the humidity value provided) + * @param humidity The humidity value + * @return The formatted string if a valid value is provided, "-" otherwise. Decimals are + * removed + */ + public static String formatHumidity(double humidity) { + return getFormattedValue(humidity, "%"); + } + + /** + * Returns a localized string of the speed and speed unit + * @param context Application context to access resources + * @param windSpeed The wind speed + * @param windSpeedUnit The speed unit. See + * {@link cyanogenmod.providers.WeatherContract.WeatherColumns.WindSpeedUnit} + * @return The formatted string if a valid speed and speed unit a provided. + * {@link com.cyanogenmod.lockclock.R.string#unknown} otherwise + */ + public static String formatWindSpeed(Context context, double windSpeed, int windSpeedUnit) { + if (windSpeed < 0) { + return context.getString(R.string.unknown); + } + + String localizedSpeedUnit; + switch (windSpeedUnit) { + case WeatherContract.WeatherColumns.WindSpeedUnit.MPH: + localizedSpeedUnit = context.getString(R.string.weather_mph); + break; + case WeatherContract.WeatherColumns.WindSpeedUnit.KPH: + localizedSpeedUnit = context.getString(R.string.weather_kph); + break; + default: + return context.getString(R.string.unknown); + } + return getFormattedValue(windSpeed, localizedSpeedUnit); + } + + /** + * Helper method to convert miles to kilometers + * @param miles The value in miles + * @return The value in kilometers + */ + public static double milesToKilometers(double miles) { + return miles * 1.609344d; + } + + /** + * Helper method to convert kilometers to miles + * @param km The value in kilometers + * @return The value in miles + */ + public static double kilometersToMiles(double km) { + return km * 0.6214d; + } + + /** + * Adds an offset to the condition code reported by the active weather service provider. + * @param conditionCode The condition code from the Weather API + * @return A condition code that correctly maps to our resource IDs + */ + public static int addOffsetToConditionCodeFromWeatherContract(int conditionCode) { + if (conditionCode <= WeatherContract.WeatherColumns.WeatherCode.SHOWERS) { + return conditionCode; + } else if (conditionCode <= SCATTERED_THUNDERSTORMS) { + return conditionCode + 1; + } else if (conditionCode <= SCATTERED_SNOW_SHOWERS) { + return conditionCode + 2; + } else if (conditionCode <= ISOLATED_THUNDERSHOWERS) { + return conditionCode + 3; + } else { + return NOT_AVAILABLE; + } + } + + /** + * Checks if the CM Weather service is available in this device + * @param context + * @return true if service is available, false otherwise + */ + public static boolean isWeatherServiceAvailable(Context context) { + if (!weatherServiceFeatureCached) { + weatherServiceAvailable = context.getPackageManager() + .hasSystemFeature(CMContextConstants.Features.WEATHER_SERVICES); + weatherServiceFeatureCached = true; + } + return weatherServiceAvailable; + } +} diff --git a/src/com/cyanogenmod/lockclock/weather/WeatherContentProvider.java b/src/com/cyanogenmod/lockclock/weather/WeatherContentProvider.java deleted file mode 100644 index a2ab385..0000000 --- a/src/com/cyanogenmod/lockclock/weather/WeatherContentProvider.java +++ /dev/null @@ -1,187 +0,0 @@ - -package com.cyanogenmod.lockclock.weather; - -import android.content.ContentProvider; -import android.content.ContentValues; -import android.content.Context; -import android.content.Intent; -import android.content.UriMatcher; -import android.database.Cursor; -import android.database.MatrixCursor; -import android.net.Uri; -import android.util.Log; - -import com.cyanogenmod.lockclock.misc.Preferences; -import com.cyanogenmod.lockclock.weather.WeatherInfo.DayForecast; - -public class WeatherContentProvider extends ContentProvider { - - public static final String TAG = WeatherContentProvider.class.getSimpleName(); - private static final boolean DEBUG = false; - - static WeatherInfo sCachedWeatherInfo; - - private static final int URI_TYPE_EVERYTHING = 1; - private static final int URI_TYPE_CURRENT = 2; - private static final int URI_TYPE_FORECAST = 3; - - private static final String COLUMN_CURRENT_CITY_ID = "city_id"; - private static final String COLUMN_CURRENT_CITY = "city"; - private static final String COLUMN_CURRENT_CONDITION = "condition"; - private static final String COLUMN_CURRENT_TEMPERATURE = "temperature"; - private static final String COLUMN_CURRENT_HUMIDITY = "humidity"; - private static final String COLUMN_CURRENT_WIND = "wind"; - private static final String COLUMN_CURRENT_TIME_STAMP = "time_stamp"; - private static final String COLUMN_CURRENT_CONDITION_CODE = "condition_code"; - - private static final String COLUMN_FORECAST_LOW = "forecast_low"; - private static final String COLUMN_FORECAST_HIGH = "forecast_high"; - private static final String COLUMN_FORECAST_CONDITION = "forecast_condition"; - private static final String COLUMN_FORECAST_CONDITION_CODE = "forecast_condition_code"; - - private static final String[] PROJECTION_DEFAULT_CURRENT = new String[] { - COLUMN_CURRENT_CITY_ID, - COLUMN_CURRENT_CITY, - COLUMN_CURRENT_CONDITION, - COLUMN_CURRENT_TEMPERATURE, - COLUMN_CURRENT_HUMIDITY, - COLUMN_CURRENT_WIND, - COLUMN_CURRENT_TIME_STAMP, - COLUMN_CURRENT_CONDITION_CODE - }; - - private static final String[] PROJECTION_DEFAULT_FORECAST = new String[] { - COLUMN_FORECAST_LOW, - COLUMN_FORECAST_HIGH, - COLUMN_FORECAST_CONDITION, - COLUMN_FORECAST_CONDITION_CODE - }; - - private static final String[] PROJECTION_DEFAULT_EVERYTHING = new String[] { - COLUMN_CURRENT_CITY_ID, - COLUMN_CURRENT_CITY, - COLUMN_CURRENT_CONDITION, - COLUMN_CURRENT_TEMPERATURE, - COLUMN_CURRENT_HUMIDITY, - COLUMN_CURRENT_WIND, - COLUMN_CURRENT_TIME_STAMP, - COLUMN_CURRENT_CONDITION_CODE, - - COLUMN_FORECAST_LOW, - COLUMN_FORECAST_HIGH, - COLUMN_FORECAST_CONDITION, - COLUMN_FORECAST_CONDITION_CODE - }; - - public static final String AUTHORITY = "com.cyanogenmod.lockclock.weather.provider"; - - private static final UriMatcher sUriMatcher; - static { - sUriMatcher = new UriMatcher(URI_TYPE_EVERYTHING); - sUriMatcher.addURI(AUTHORITY, "weather", URI_TYPE_EVERYTHING); - sUriMatcher.addURI(AUTHORITY, "weather/current", URI_TYPE_CURRENT); - sUriMatcher.addURI(AUTHORITY, "weather/forecast", URI_TYPE_FORECAST); - } - - private Context mContext; - - @Override - public boolean onCreate() { - mContext = getContext(); - sCachedWeatherInfo = Preferences.getCachedWeatherInfo(mContext); - return true; - } - - @Override - public Cursor query( - Uri uri, - String[] projection, - String selection, - String[] selectionArgs, - String sortOrder) { - - final int projectionType = sUriMatcher.match(uri); - final MatrixCursor result = new MatrixCursor(resolveProjection(projection, projectionType)); - - WeatherInfo weather = sCachedWeatherInfo; - if (weather != null) { - // current - result.newRow() - .add(COLUMN_CURRENT_CITY, weather.getCity()) - .add(COLUMN_CURRENT_CITY_ID, weather.getId()) - .add(COLUMN_CURRENT_CONDITION, weather.getCondition()) - .add(COLUMN_CURRENT_HUMIDITY, weather.getFormattedHumidity()) - .add(COLUMN_CURRENT_WIND, weather.getFormattedWindSpeed() - + " " + weather.getWindDirection()) - .add(COLUMN_CURRENT_TEMPERATURE, weather.getFormattedTemperature()) - .add(COLUMN_CURRENT_TIME_STAMP, weather.getTimestamp().toString()) - .add(COLUMN_CURRENT_CONDITION_CODE, weather.getConditionCode()); - - // forecast - for (DayForecast day : weather.getForecasts()) { - result.newRow() - .add(COLUMN_FORECAST_CONDITION, day.getCondition(mContext)) - .add(COLUMN_FORECAST_LOW, day.getFormattedLow()) - .add(COLUMN_FORECAST_HIGH, day.getFormattedHigh()) - .add(COLUMN_FORECAST_CONDITION_CODE, day.getConditionCode()); - } - return result; - } else { - if (DEBUG) Log.e(TAG, "sCachedWeatherInfo is null"); - Intent updateWeather = new Intent(WeatherUpdateService.ACTION_FORCE_UPDATE); - updateWeather.setClass(mContext, WeatherUpdateService.class); - mContext.startService(updateWeather); - } - return null; - } - - private String[] resolveProjection(String[] projection, int uriType) { - if (projection != null) - return projection; - switch (uriType) { - default: - case URI_TYPE_EVERYTHING: - return PROJECTION_DEFAULT_EVERYTHING; - - case URI_TYPE_CURRENT: - return PROJECTION_DEFAULT_CURRENT; - - case URI_TYPE_FORECAST: - return PROJECTION_DEFAULT_FORECAST; - } - } - - @Override - public String getType(Uri uri) { - return null; - } - - @Override - public Uri insert(Uri uri, ContentValues values) { - return null; - } - - @Override - public int delete(Uri uri, String selection, String[] selectionArgs) { - return 0; - } - - @Override - public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { - return 0; - } - - public static void updateCachedWeatherInfo(Context context, WeatherInfo info) { - if (DEBUG) Log.e(TAG, "updateCachedWeatherInfo()"); - if(info != null) { - if (DEBUG) Log.e(TAG, "set new weather info"); - sCachedWeatherInfo = WeatherInfo.fromSerializedString(context, info.toSerializedString()); - } else { - if(DEBUG) Log.e(TAG, "nulled out cached weather info"); - sCachedWeatherInfo = null; - } - context.getContentResolver().notifyChange( - Uri.parse("content://" + WeatherContentProvider.AUTHORITY + "/weather"), null); - } - -} diff --git a/src/com/cyanogenmod/lockclock/weather/WeatherInfo.java b/src/com/cyanogenmod/lockclock/weather/WeatherInfo.java deleted file mode 100755 index 7ad4339..0000000 --- a/src/com/cyanogenmod/lockclock/weather/WeatherInfo.java +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Copyright (C) 2012 The AOKP Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.cyanogenmod.lockclock.weather; - -import android.content.Context; -import android.content.res.Resources; -import android.graphics.Bitmap; - -import com.cyanogenmod.lockclock.R; -import com.cyanogenmod.lockclock.misc.IconUtils; - -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.Date; - -public class WeatherInfo { - private static final DecimalFormat sNoDigitsFormat = new DecimalFormat("0"); - - private Context mContext; - - private String id; - private String city; - private String condition; - private int conditionCode; - private float temperature; - private String tempUnit; - private float humidity; - private float wind; - private int windDirection; - private String speedUnit; - private long timestamp; - private ArrayList<DayForecast> forecasts; - - public WeatherInfo(Context context, String id, - String city, String condition, int conditionCode, float temp, - String tempUnit, float humidity, float wind, int windDir, - String speedUnit, ArrayList<DayForecast> forecasts, long timestamp) { - this.mContext = context.getApplicationContext(); - this.id = id; - this.city = city; - this.condition = condition; - this.conditionCode = conditionCode; - this.humidity = humidity; - this.wind = wind; - this.windDirection = windDir; - this.speedUnit = speedUnit; - this.timestamp = timestamp; - this.temperature = temp; - this.tempUnit = tempUnit; - this.forecasts = forecasts; - } - - public static class DayForecast { - public final float low, high; - public final int conditionCode; - public final String condition; - - public DayForecast(float low, float high, String condition, int conditionCode) { - this.low = low; - this.high = high; - this.condition = condition; - this.conditionCode = conditionCode; - } - - public String getFormattedLow() { - return getFormattedValue(low, "\u00b0"); - } - - public String getFormattedHigh() { - return getFormattedValue(high, "\u00b0"); - } - - public int getConditionResource(Context context, String set) { - return IconUtils.getWeatherIconResource(context, set, conditionCode); - } - - public Bitmap getConditionBitmap(Context context, String set, int color) { - return IconUtils.getWeatherIconBitmap(context, set, color, conditionCode); - } - - public Bitmap getConditionBitmap(Context context, String set, int color, int density) { - return IconUtils.getWeatherIconBitmap(context, set, color, conditionCode, density); - } - - public String getCondition(Context context) { - return WeatherInfo.getCondition(context, conditionCode, condition); - } - - public int getConditionCode() { - return conditionCode; - } - } - - public int getConditionResource(String set) { - return IconUtils.getWeatherIconResource(mContext, set, conditionCode); - } - - public Bitmap getConditionBitmap(String set, int color) { - return IconUtils.getWeatherIconBitmap(mContext, set, color, conditionCode); - } - - public Bitmap getConditionBitmap(String set, int color, int density) { - return IconUtils.getWeatherIconBitmap(mContext, set, color, conditionCode, density); - } - - public String getId() { - return id; - } - - public String getCity() { - return city; - } - - public String getCondition() { - return getCondition(mContext, conditionCode, condition); - } - - public int getConditionCode() { - return conditionCode; - } - - private static String getCondition(Context context, int conditionCode, String condition) { - final Resources res = context.getResources(); - final int resId = res.getIdentifier("weather_" + conditionCode, "string", context.getPackageName()); - if (resId != 0) { - return res.getString(resId); - } - return condition; - } - - public Date getTimestamp() { - return new Date(timestamp); - } - - private static String getFormattedValue(float value, String unit) { - if (Float.isNaN(value)) { - return "-"; - } - String formatted = sNoDigitsFormat.format(value); - if (formatted.equals("-0")) { - formatted = "0"; - } - return formatted + unit; - } - - public String getFormattedTemperature() { - return getFormattedValue(temperature, "\u00b0" + tempUnit); - } - - public String getFormattedLow() { - return forecasts.get(0).getFormattedLow(); - } - - public String getFormattedHigh() { - return forecasts.get(0).getFormattedHigh(); - } - - public String getFormattedHumidity() { - return getFormattedValue(humidity, "%"); - } - - public String getFormattedWindSpeed() { - if (wind < 0) { - return mContext.getString(R.string.unknown); - } - return getFormattedValue(wind, speedUnit); - } - - public String getWindDirection() { - int resId; - - if (windDirection < 0) resId = R.string.unknown; - else if (windDirection < 23) resId = R.string.weather_N; - else if (windDirection < 68) resId = R.string.weather_NE; - else if (windDirection < 113) resId = R.string.weather_E; - else if (windDirection < 158) resId = R.string.weather_SE; - else if (windDirection < 203) resId = R.string.weather_S; - else if (windDirection < 248) resId = R.string.weather_SW; - else if (windDirection < 293) resId = R.string.weather_W; - else if (windDirection < 338) resId = R.string.weather_NW; - else resId = R.string.weather_N; - - return mContext.getString(resId); - } - - public ArrayList<DayForecast> getForecasts() { - return forecasts; - } - - @Override - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("WeatherInfo for "); - builder.append(city); - builder.append(" ("); - builder.append(id); - builder.append(") @ "); - builder.append(getTimestamp()); - builder.append(": "); - builder.append(getCondition()); - builder.append("("); - builder.append(conditionCode); - builder.append("), temperature "); - builder.append(getFormattedTemperature()); - builder.append(", low "); - builder.append(getFormattedLow()); - builder.append(", high "); - builder.append(getFormattedHigh()); - builder.append(", humidity "); - builder.append(getFormattedHumidity()); - builder.append(", wind "); - builder.append(getFormattedWindSpeed()); - builder.append(" at "); - builder.append(getWindDirection()); - if (forecasts.size() > 0) { - builder.append(", forecasts:"); - } - for (int i = 0; i < forecasts.size(); i++) { - DayForecast d = forecasts.get(i); - if (i != 0) { - builder.append(";"); - } - builder.append(" day ").append(i + 1).append(": "); - builder.append("high ").append(d.getFormattedHigh()); - builder.append(", low ").append(d.getFormattedLow()); - builder.append(", ").append(d.condition); - builder.append("(").append(d.conditionCode).append(")"); - } - return builder.toString(); - } - - public String toSerializedString() { - StringBuilder builder = new StringBuilder(); - builder.append(id).append('|'); - builder.append(city).append('|'); - builder.append(condition).append('|'); - builder.append(conditionCode).append('|'); - builder.append(temperature).append('|'); - builder.append(tempUnit).append('|'); - builder.append(humidity).append('|'); - builder.append(wind).append('|'); - builder.append(windDirection).append('|'); - builder.append(speedUnit).append('|'); - builder.append(timestamp).append('|'); - serializeForecasts(builder); - return builder.toString(); - } - - private void serializeForecasts(StringBuilder builder) { - builder.append(forecasts.size()); - for (DayForecast d : forecasts) { - builder.append(';'); - builder.append(d.high).append(';'); - builder.append(d.low).append(';'); - builder.append(d.condition).append(';'); - builder.append(d.conditionCode); - } - } - - public static WeatherInfo fromSerializedString(Context context, String input) { - if (input == null) { - return null; - } - - String[] parts = input.split("\\|"); - if (parts == null || parts.length != 12) { - return null; - } - - int conditionCode, windDirection; - long timestamp; - float temperature, humidity, wind; - String[] forecastParts = parts[11].split(";"); - int forecastItems; - ArrayList<DayForecast> forecasts = new ArrayList<DayForecast>(); - - // Parse the core data - try { - conditionCode = Integer.parseInt(parts[3]); - temperature = Float.parseFloat(parts[4]); - humidity = Float.parseFloat(parts[6]); - wind = Float.parseFloat(parts[7]); - windDirection = Integer.parseInt(parts[8]); - timestamp = Long.parseLong(parts[10]); - forecastItems = forecastParts == null ? 0 : Integer.parseInt(forecastParts[0]); - } catch (NumberFormatException e) { - return null; - } - - if (forecastItems == 0 || forecastParts.length != 4 * forecastItems + 1) { - return null; - } - - // Parse the forecast data - try { - for (int item = 0; item < forecastItems; item ++) { - int offset = item * 4 + 1; - DayForecast day = new DayForecast( - /* low */ Float.parseFloat(forecastParts[offset + 1]), - /* high */ Float.parseFloat(forecastParts[offset]), - /* condition */ forecastParts[offset + 2], - /* conditionCode */ Integer.parseInt(forecastParts[offset + 3])); - if (!Float.isNaN(day.low) && !Float.isNaN(day.high) && day.conditionCode >= 0) { - forecasts.add(day); - } - } - } catch (NumberFormatException ignored) { - } - - if (forecasts.isEmpty()) { - return null; - } - - return new WeatherInfo(context, - /* id */ parts[0], /* city */ parts[1], /* condition */ parts[2], - conditionCode, temperature, /* tempUnit */ parts[5], - humidity, wind, windDirection, /* speedUnit */ parts[9], - /* forecasts */ forecasts, timestamp); - } -} diff --git a/src/com/cyanogenmod/lockclock/weather/WeatherProvider.java b/src/com/cyanogenmod/lockclock/weather/WeatherProvider.java deleted file mode 100644 index 70fbf42..0000000 --- a/src/com/cyanogenmod/lockclock/weather/WeatherProvider.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2013 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.cyanogenmod.lockclock.weather; - -import android.location.Location; - -import java.util.List; - -public interface WeatherProvider { - public class LocationResult { - public String id; - public String city; - public String postal; - public String countryId; - public String country; - } - - List<LocationResult> getLocations(String input); - - WeatherInfo getWeatherInfo(String id, String localizedCityName, boolean metricUnits); - - WeatherInfo getWeatherInfo(Location location, boolean metricUnits); - - int getNameResourceId(); -} diff --git a/src/com/cyanogenmod/lockclock/weather/WeatherSourceListenerService.java b/src/com/cyanogenmod/lockclock/weather/WeatherSourceListenerService.java new file mode 100644 index 0000000..be3b9f8 --- /dev/null +++ b/src/com/cyanogenmod/lockclock/weather/WeatherSourceListenerService.java @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2016 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.cyanogenmod.lockclock.weather; + +import android.app.Service; +import android.content.Context; +import android.content.Intent; +import android.os.IBinder; +import android.util.Log; +import com.cyanogenmod.lockclock.ClockWidgetService; +import com.cyanogenmod.lockclock.misc.Constants; +import com.cyanogenmod.lockclock.misc.Preferences; +import cyanogenmod.weather.CMWeatherManager; + +public class WeatherSourceListenerService extends Service + implements CMWeatherManager.WeatherServiceProviderChangeListener { + + private static final String TAG = WeatherSourceListenerService.class.getSimpleName(); + private static final boolean D = Constants.DEBUG; + private Context mContext; + private volatile boolean mRegistered; + + @Override + public void onWeatherServiceProviderChanged(String providerLabel) { + if (D) Log.d(TAG, "Weather Source changed " + providerLabel); + Preferences.setWeatherSource(mContext, providerLabel); + Preferences.setCachedWeatherInfo(mContext, 0, null); + //The data contained in WeatherLocation is tightly coupled to the weather provider + //that generated that data, so we need to clear the cached weather location and let the new + //weather provider regenerate the data if the user decides to use custom location again + Preferences.setCustomWeatherLocationCity(mContext, null); + Preferences.setCustomWeatherLocation(mContext, null); + Preferences.setUseCustomWeatherLocation(mContext, false); + + //Refresh the widget + mContext.startService(new Intent(mContext, ClockWidgetService.class) + .setAction(ClockWidgetService.ACTION_REFRESH)); + + if (providerLabel != null) { + mContext.startService(new Intent(mContext, WeatherUpdateService.class) + .putExtra(WeatherUpdateService.ACTION_FORCE_UPDATE, true)); + } + } + + @Override + public void onCreate() { + mContext = getApplicationContext(); + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + final CMWeatherManager weatherManager + = CMWeatherManager.getInstance(mContext); + weatherManager.registerWeatherServiceProviderChangeListener(this); + mRegistered = true; + if (D) Log.d(TAG, "Listener registered"); + return START_STICKY; + } + + @Override + public void onDestroy() { + if (mRegistered) { + final CMWeatherManager weatherManager = CMWeatherManager.getInstance(mContext); + weatherManager.unregisterWeatherServiceProviderChangeListener(this); + } + } + + @Override + public IBinder onBind(Intent intent) { + return null; + } +} diff --git a/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java b/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java index 9110f02..c65dc86 100644 --- a/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java +++ b/src/com/cyanogenmod/lockclock/weather/WeatherUpdateService.java @@ -26,21 +26,29 @@ import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.location.LocationProvider; -import android.os.AsyncTask; import android.os.Bundle; +import android.os.Handler; +import android.os.HandlerThread; import android.os.IBinder; +import android.os.Looper; +import android.os.Message; import android.os.PowerManager; import android.os.PowerManager.WakeLock; import android.os.SystemClock; import android.text.TextUtils; import android.util.Log; - +import android.widget.Toast; import com.cyanogenmod.lockclock.ClockWidgetProvider; +import com.cyanogenmod.lockclock.R; import com.cyanogenmod.lockclock.misc.Constants; import com.cyanogenmod.lockclock.misc.Preferences; import com.cyanogenmod.lockclock.misc.WidgetUtils; import com.cyanogenmod.lockclock.preference.WeatherPreferences; +import cyanogenmod.weather.CMWeatherManager; +import cyanogenmod.weather.WeatherInfo; +import cyanogenmod.weather.WeatherLocation; +import java.lang.ref.WeakReference; import java.util.Date; public class WeatherUpdateService extends Service { @@ -51,6 +59,10 @@ public class WeatherUpdateService extends Service { private static final String ACTION_CANCEL_LOCATION_UPDATE = "com.cyanogenmod.lockclock.action.CANCEL_LOCATION_UPDATE"; + private static final String ACTION_CANCEL_UPDATE_WEATHER_REQUEST = + "com.cyanogenmod.lockclock.action.CANCEL_UPDATE_WEATHER_REQUEST"; + private static final long WEATHER_UPDATE_REQUEST_TIMEOUT_MS = 30L * 1000L; + // Broadcast action for end of update public static final String ACTION_UPDATE_FINISHED = "com.cyanogenmod.lockclock.action.WEATHER_UPDATE_FINISHED"; public static final String EXTRA_UPDATE_CANCELLED = "update_cancelled"; @@ -59,7 +71,8 @@ public class WeatherUpdateService extends Service { private static final long OUTDATED_LOCATION_THRESHOLD_MILLIS = 10L * 60L * 1000L; // 10 minutes private static final float LOCATION_ACCURACY_THRESHOLD_METERS = 50000; - private WeatherUpdateTask mTask; + private WorkerThread mWorkerThread; + private Handler mHandler; private static final Criteria sLocationCriteria; static { @@ -70,107 +83,244 @@ public class WeatherUpdateService extends Service { } @Override + public void onCreate() { + Log.d(TAG, "onCreate"); + mWorkerThread = new WorkerThread(getApplicationContext()); + mWorkerThread.start(); + mWorkerThread.prepareHandler(); + mHandler = new Handler(Looper.getMainLooper()); + } + + @Override public int onStartCommand(Intent intent, int flags, int startId) { if (D) Log.v(TAG, "Got intent " + intent); - boolean active = mTask != null && mTask.getStatus() != AsyncTask.Status.FINISHED; - if (ACTION_CANCEL_LOCATION_UPDATE.equals(intent.getAction())) { WeatherLocationListener.cancel(this); - if (!active) { + if (!mWorkerThread.isProcessing()) { stopSelf(); } return START_NOT_STICKY; } - if (active) { - if (D) Log.v(TAG, "Weather update is still active, not starting new update"); - return START_REDELIVER_INTENT; + if (ACTION_CANCEL_UPDATE_WEATHER_REQUEST.equals(intent.getAction())) { + if (mWorkerThread.isProcessing()) { + mWorkerThread.getHandler().obtainMessage( + WorkerThread.MSG_CANCEL_UPDATE_WEATHER_REQUEST).sendToTarget(); + mHandler.post(new Runnable() { + @Override + public void run() { + final Context context = getApplicationContext(); + final CMWeatherManager weatherManager + = CMWeatherManager.getInstance(context); + final String activeProviderLabel + = weatherManager.getActiveWeatherServiceProviderLabel(); + final String noData + = getString(R.string.weather_cannot_reach_provider, + activeProviderLabel); + Toast.makeText(context, noData, Toast.LENGTH_SHORT).show(); + } + }); + } + stopSelf(); + return START_NOT_STICKY; } boolean force = ACTION_FORCE_UPDATE.equals(intent.getAction()); if (!shouldUpdate(force)) { Log.d(TAG, "Service started, but shouldn't update ... stopping"); - stopSelf(); sendCancelledBroadcast(); + stopSelf(); return START_NOT_STICKY; } - mTask = new WeatherUpdateTask(); - mTask.execute(); + mWorkerThread.getHandler().obtainMessage(WorkerThread.MSG_ON_NEW_WEATHER_REQUEST) + .sendToTarget(); return START_REDELIVER_INTENT; } - private void sendCancelledBroadcast() { - Intent finishedIntent = new Intent(ACTION_UPDATE_FINISHED); - finishedIntent.putExtra(EXTRA_UPDATE_CANCELLED, true); - sendBroadcast(finishedIntent); - } - - @Override - public IBinder onBind(Intent intent) { - return null; - } - - @Override - public void onDestroy() { - if (mTask != null && mTask.getStatus() != AsyncTask.Status.FINISHED) { - mTask.cancel(true); - mTask = null; + private boolean shouldUpdate(boolean force) { + final CMWeatherManager weatherManager + = CMWeatherManager.getInstance(getApplicationContext()); + if (weatherManager.getActiveWeatherServiceProviderLabel() == null) { + //Why bother if we don't even have an active provider + if (D) Log.d(TAG, "No active weather service provider found, skip"); + return false; } - } - private boolean shouldUpdate(boolean force) { - long interval = Preferences.weatherRefreshIntervalInMs(this); + final long interval = Preferences.weatherRefreshIntervalInMs(this); if (interval == 0 && !force) { - if (D) Log.v(TAG, "Interval set to manual and update not forced, skip update"); + if (D) Log.v(TAG, "Interval set to manual and update not forced, skip"); return false; } if (!WeatherPreferences.hasLocationPermission(this)) { - if (D) Log.v(TAG, "Application does not have the location permission"); + if (D) Log.v(TAG, "Application does not have the location permission, skip"); return false; } - if (force) { - Preferences.setCachedWeatherInfo(this, 0, null); - } - - long now = System.currentTimeMillis(); - long lastUpdate = Preferences.lastWeatherUpdateTimestamp(this); - long due = lastUpdate + interval; - - if (D) Log.d(TAG, "Now " + now + " due " + due + "(" + new Date(due) + ")"); + if (WidgetUtils.isNetworkAvailable(this)) { + if (force) { + if (D) Log.d(TAG, "Forcing weather update"); + return true; + } else { + final long now = SystemClock.elapsedRealtime(); + final long lastUpdate = Preferences.lastWeatherUpdateTimestamp(this); + final long due = lastUpdate + interval; + if (D) { + Log.d(TAG, "Now " + now + " Last update " + lastUpdate + + " interval " + interval); + } - if (lastUpdate != 0 && now < due) { - if (D) Log.v(TAG, "Weather update is not due yet"); + if (lastUpdate == 0 || due - now < 0) { + if (D) Log.d(TAG, "Should update"); + return true; + } else { + if (D) Log.v(TAG, "Next weather update due in " + (due - now) + " ms, skip"); + return false; + } + } + } else { + if (D) Log.d(TAG, "Network is not available, skip"); return false; } - - return WidgetUtils.isNetworkAvailable(this); } - private class WeatherUpdateTask extends AsyncTask<Void, Void, WeatherInfo> { + private static class WorkerThread extends HandlerThread + implements CMWeatherManager.WeatherUpdateRequestListener { + + public static final int MSG_ON_NEW_WEATHER_REQUEST = 1; + public static final int MSG_ON_WEATHER_REQUEST_COMPLETED = 2; + public static final int MSG_WEATHER_REQUEST_FAILED = 3; + public static final int MSG_CANCEL_UPDATE_WEATHER_REQUEST = 4; + + private Handler mHandler; + private boolean mIsProcessingWeatherUpdate = false; private WakeLock mWakeLock; - private Context mContext; + private PendingIntent mTimeoutPendingIntent; + private int mRequestId; + private final CMWeatherManager mWeatherManager; + final private Context mContext; + + public WorkerThread(Context context) { + super("weather-service-worker"); + mContext = context; + mWeatherManager = CMWeatherManager.getInstance(mContext); + } + + public synchronized void prepareHandler() { + mHandler = new Handler(getLooper()) { + @Override + public void handleMessage(Message msg) { + if (D) Log.d(TAG, "Msg " + msg.what); + switch (msg.what) { + case MSG_ON_NEW_WEATHER_REQUEST: + onNewWeatherRequest(); + break; + case MSG_ON_WEATHER_REQUEST_COMPLETED: + WeatherInfo info = (WeatherInfo) msg.obj; + onWeatherRequestCompleted(info); + break; + case MSG_WEATHER_REQUEST_FAILED: + int status = msg.arg1; + onWeatherRequestFailed(status); + break; + case MSG_CANCEL_UPDATE_WEATHER_REQUEST: + onCancelUpdateWeatherRequest(); + break; + default: + //Unknown message, pass it on... + super.handleMessage(msg); + } + } + }; + } + + private void startTimeoutAlarm() { + Intent intent = new Intent(mContext, WeatherUpdateService.class); + intent.setAction(ACTION_CANCEL_UPDATE_WEATHER_REQUEST); - public WeatherUpdateTask() { - if (D) Log.d(TAG, "Starting weather update task"); - PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE); + mTimeoutPendingIntent = PendingIntent.getService(mContext, 0, intent, + PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT); + + AlarmManager am = (AlarmManager) mContext.getSystemService(ALARM_SERVICE); + long elapseTime = SystemClock.elapsedRealtime() + WEATHER_UPDATE_REQUEST_TIMEOUT_MS; + am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, elapseTime, mTimeoutPendingIntent); + if (D) Log.v(TAG, "Timeout alarm set to expire in " + elapseTime + " ms"); + } + + private void cancelTimeoutAlarm() { + if (mTimeoutPendingIntent != null) { + AlarmManager am = (AlarmManager) mContext.getSystemService(ALARM_SERVICE); + am.cancel(mTimeoutPendingIntent); + mTimeoutPendingIntent = null; + if (D) Log.v(TAG, "Timeout alarm cancelled"); + } + } + + public synchronized Handler getHandler() { + return mHandler; + } + + private void onNewWeatherRequest() { + if (mIsProcessingWeatherUpdate) { + Log.d(TAG, "Already processing weather update, discarding request..."); + return; + } + + mIsProcessingWeatherUpdate = true; + final PowerManager pm + = (PowerManager) mContext.getSystemService(POWER_SERVICE); mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); mWakeLock.setReferenceCounted(false); - mContext = WeatherUpdateService.this; + if (D) Log.v(TAG, "ACQUIRING WAKELOCK"); + mWakeLock.acquire(); + + WeatherLocation customWeatherLocation = null; + if (Preferences.useCustomWeatherLocation(mContext)) { + customWeatherLocation = Preferences.getCustomWeatherLocation(mContext); + } + if (customWeatherLocation != null) { + mRequestId = mWeatherManager.requestWeatherUpdate(customWeatherLocation, this); + if (D) Log.d(TAG, "Request submitted using WeatherLocation"); + startTimeoutAlarm(); + } else { + final Location location = getCurrentLocation(); + if (location != null) { + mRequestId = mWeatherManager.requestWeatherUpdate(location, this); + if (D) Log.d(TAG, "Request submitted using Location"); + startTimeoutAlarm(); + } else { + // work with cached location from last request for now + // a listener to update it is already scheduled if possible + WeatherInfo cachedInfo = Preferences.getCachedWeatherInfo(mContext); + if (cachedInfo != null) { + mHandler.obtainMessage(MSG_ON_WEATHER_REQUEST_COMPLETED, + cachedInfo).sendToTarget(); + if (D) Log.d(TAG, "Returning cached weather data [ " + + cachedInfo.toString()+ " ]"); + } else { + mHandler.obtainMessage(MSG_WEATHER_REQUEST_FAILED, + CMWeatherManager.RequestStatus.FAILED, 0).sendToTarget(); + } + } + } } - @Override - protected void onPreExecute() { - if (D) Log.d(TAG, "ACQUIRING WAKELOCK"); - mWakeLock.acquire(); + public void tearDown() { + if (D) Log.d(TAG, "Tearing down worker thread"); + if (isProcessing()) mWeatherManager.cancelRequest(mRequestId); + quit(); + } + + public boolean isProcessing() { + return mIsProcessingWeatherUpdate; } private Location getCurrentLocation() { - LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); + final LocationManager lm + = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER); if (D) Log.v(TAG, "Current location is " + location); @@ -201,7 +351,6 @@ public class WeatherUpdateService extends Service { WeatherLocationListener.registerIfNeeded(mContext, locationProvider); } } - return location; } @@ -209,77 +358,81 @@ public class WeatherUpdateService extends Service { return false; } - @Override - protected WeatherInfo doInBackground(Void... params) { - WeatherProvider provider = Preferences.weatherProvider(mContext); - boolean metric = Preferences.useMetricUnits(mContext); - String customLocationId = null, customLocationName = null; - - if (Preferences.useCustomWeatherLocation(mContext)) { - customLocationId = Preferences.customWeatherLocationId(mContext); - customLocationName = Preferences.customWeatherLocationCity(mContext); - } + private void onWeatherRequestCompleted(WeatherInfo result) { + if (D) Log.d(TAG, "Weather update received, caching data and updating widget"); + cancelTimeoutAlarm(); + long now = SystemClock.elapsedRealtime(); + Preferences.setCachedWeatherInfo(mContext, now, result); + scheduleUpdate(mContext, Preferences.weatherRefreshIntervalInMs(mContext), false); - if (customLocationId != null) { - return provider.getWeatherInfo(customLocationId, customLocationName, metric); - } + Intent updateIntent = new Intent(mContext, ClockWidgetProvider.class); + mContext.sendBroadcast(updateIntent); + broadcastAndCleanUp(false); + } - Location location = getCurrentLocation(); - if (location != null) { - WeatherInfo info = provider.getWeatherInfo(location, metric); - if (info != null) { - return info; - } + private void onWeatherRequestFailed(int status) { + if (D) Log.d(TAG, "Weather refresh failed ["+status+"]"); + cancelTimeoutAlarm(); + if (status == CMWeatherManager.RequestStatus.ALREADY_IN_PROGRESS) { + if (D) Log.d(TAG, "A request is already in progress, no need to schedule again"); + } else if (status == CMWeatherManager.RequestStatus.FAILED) { + //Something went wrong, let's schedule an update at the next interval from now + //A force update might happen earlier anyway + scheduleUpdate(mContext, Preferences.weatherRefreshIntervalInMs(mContext), false); + } else { + //Wait until the next update is due + scheduleNextUpdate(mContext, false); } + broadcastAndCleanUp(true); + } - // work with cached location from last request for now - // a listener to update it is already scheduled if possible - WeatherInfo cachedInfo = Preferences.getCachedWeatherInfo(mContext); - if (cachedInfo != null) { - return provider.getWeatherInfo(cachedInfo.getId(), cachedInfo.getCity(), metric); + private void onCancelUpdateWeatherRequest() { + if (D) Log.d(TAG, "Cancelling active weather request"); + if (mIsProcessingWeatherUpdate) { + cancelTimeoutAlarm(); + mWeatherManager.cancelRequest(mRequestId); + broadcastAndCleanUp(true); } - - return null; } - @Override - protected void onPostExecute(WeatherInfo result) { - finish(result); - } + private void broadcastAndCleanUp(boolean updateCancelled) { + Intent finishedIntent = new Intent(ACTION_UPDATE_FINISHED); + finishedIntent.putExtra(EXTRA_UPDATE_CANCELLED, updateCancelled); + mContext.sendBroadcast(finishedIntent); - @Override - protected void onCancelled() { - finish(null); + if (D) Log.d(TAG, "RELEASING WAKELOCK"); + mWakeLock.release(); + mIsProcessingWeatherUpdate = false; + mContext.stopService(new Intent(mContext, WeatherUpdateService.class)); } - private void finish(WeatherInfo result) { - if (result != null) { - if (D) Log.d(TAG, "Weather update received, caching data and updating widget"); - long now = System.currentTimeMillis(); - Preferences.setCachedWeatherInfo(mContext, now, result); - scheduleUpdate(mContext, Preferences.weatherRefreshIntervalInMs(mContext), false); - - Intent updateIntent = new Intent(mContext, ClockWidgetProvider.class); - sendBroadcast(updateIntent); - } else if (isCancelled()) { - // cancelled, likely due to lost network - we'll get restarted - // when network comes back + @Override + public void onWeatherRequestCompleted(int state, WeatherInfo weatherInfo) { + if (state == CMWeatherManager.RequestStatus.COMPLETED) { + mHandler.obtainMessage(WorkerThread.MSG_ON_WEATHER_REQUEST_COMPLETED, weatherInfo) + .sendToTarget(); } else { - // failure, schedule next download in 30 minutes - if (D) Log.d(TAG, "Weather refresh failed, scheduling update in 30 minutes"); - long interval = 30 * 60 * 1000; - scheduleUpdate(mContext, interval, false); + mHandler.obtainMessage(WorkerThread.MSG_WEATHER_REQUEST_FAILED, state, 0) + .sendToTarget(); } - WeatherContentProvider.updateCachedWeatherInfo(mContext, result); + } + } - Intent finishedIntent = new Intent(ACTION_UPDATE_FINISHED); - finishedIntent.putExtra(EXTRA_UPDATE_CANCELLED, result == null); - sendBroadcast(finishedIntent); + private void sendCancelledBroadcast() { + Intent finishedIntent = new Intent(ACTION_UPDATE_FINISHED); + finishedIntent.putExtra(EXTRA_UPDATE_CANCELLED, true); + sendBroadcast(finishedIntent); + } - if (D) Log.d(TAG, "RELEASING WAKELOCK"); - mWakeLock.release(); - stopSelf(); - } + @Override + public IBinder onBind(Intent intent) { + return null; + } + + @Override + public void onDestroy() { + Log.d(TAG, "onDestroy"); + mWorkerThread.tearDown(); } private static class WeatherLocationListener implements LocationListener { @@ -357,7 +510,7 @@ public class WeatherUpdateService extends Service { // Now, we have a location to use. Schedule a weather update right now. if (D) Log.d(TAG, "The location has changed, schedule an update "); synchronized (WeatherLocationListener.class) { - WeatherUpdateService.scheduleUpdate(mContext, 0, true); + scheduleUpdate(mContext, 0, true); cancelTimeoutAlarm(); sInstance = null; } @@ -369,7 +522,7 @@ public class WeatherUpdateService extends Service { if (D) Log.d(TAG, "The location service has become available, schedule an update "); if (status == LocationProvider.AVAILABLE) { synchronized (WeatherLocationListener.class) { - WeatherUpdateService.scheduleUpdate(mContext, 0, true); + scheduleUpdate(mContext, 0, true); cancelTimeoutAlarm(); sInstance = null; } @@ -387,21 +540,26 @@ public class WeatherUpdateService extends Service { } } - private static void scheduleUpdate(Context context, long timeFromNow, boolean force) { + private static void scheduleUpdate(Context context, long millisFromNow, boolean force) { AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); - long due = System.currentTimeMillis() + timeFromNow; - - if (D) Log.d(TAG, "Scheduling next update at " + new Date(due)); - am.set(AlarmManager.RTC_WAKEUP, due, getUpdateIntent(context, force)); + long due = SystemClock.elapsedRealtime() + millisFromNow; + if (D) Log.d(TAG, "Next update scheduled at " + + new Date(System.currentTimeMillis() + millisFromNow)); + am.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, due, getUpdateIntent(context, force)); } public static void scheduleNextUpdate(Context context, boolean force) { - long lastUpdate = Preferences.lastWeatherUpdateTimestamp(context); - if (lastUpdate == 0 || force) { + if (force) { + if (D) Log.d(TAG, "Scheduling next update immediately"); scheduleUpdate(context, 0, true); } else { - long interval = Preferences.weatherRefreshIntervalInMs(context); - scheduleUpdate(context, lastUpdate + interval - System.currentTimeMillis(), false); + final long lastUpdate = Preferences.lastWeatherUpdateTimestamp(context); + final long interval = Preferences.weatherRefreshIntervalInMs(context); + final long now = SystemClock.elapsedRealtime(); + long due = (interval + lastUpdate) - now; + if (due < 0) due = 0; + if (D) Log.d(TAG, "Scheduling in " + due + " ms"); + scheduleUpdate(context, due, false); } } diff --git a/src/com/cyanogenmod/lockclock/weather/YahooWeatherProvider.java b/src/com/cyanogenmod/lockclock/weather/YahooWeatherProvider.java deleted file mode 100644 index 21bc9e4..0000000 --- a/src/com/cyanogenmod/lockclock/weather/YahooWeatherProvider.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (C) 2013 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.cyanogenmod.lockclock.weather; - -import android.content.Context; -import android.location.Location; -import android.net.Uri; -import android.text.Html; -import android.text.TextUtils; -import android.util.Log; - -import com.cyanogenmod.lockclock.weather.WeatherInfo.DayForecast; -import com.cyanogenmod.lockclock.R; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.xml.sax.Attributes; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.DefaultHandler; - -import java.io.IOException; -import java.io.StringReader; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -public class YahooWeatherProvider implements WeatherProvider { - private static final String TAG = "YahooWeatherProvider"; - - private static final String URL_WEATHER = - "https://weather.yahooapis.com/forecastrss?w=%s&u=%s"; - private static final String URL_LOCATION = - "https://query.yahooapis.com/v1/public/yql?format=json&q=" + - Uri.encode("select woeid, postal, admin1, admin2, admin3, " + - "locality1, locality2, country from geo.places where " + - "(placetype = 7 or placetype = 8 or placetype = 9 " + - "or placetype = 10 or placetype = 11 or placetype = 20) and text ="); - private static final String URL_PLACEFINDER = - "https://query.yahooapis.com/v1/public/yql?format=json&q=" + - Uri.encode("select * from geo.places where " + - "text ="); - - private static final String[] LOCALITY_NAMES = new String[] { - "locality1", "locality2", "admin3", "admin2", "admin1" - }; - - private Context mContext; - - public YahooWeatherProvider(Context context) { - mContext = context; - } - - @Override - public int getNameResourceId() { - return R.string.weather_source_yahoo; - } - - @Override - public List<LocationResult> getLocations(String input) { - String language = getLanguage(); - String params = "\"" + input + "\" and lang = \"" + language + "\""; - String url = URL_LOCATION + Uri.encode(params); - JSONObject jsonResults = fetchResults(url); - if (jsonResults == null) { - return null; - } - - try { - JSONArray places = jsonResults.optJSONArray("place"); - if (places == null) { - // Yahoo returns an object instead of an array when there's only one result - places = new JSONArray(); - places.put(jsonResults.getJSONObject("place")); - } - - ArrayList<LocationResult> results = new ArrayList<LocationResult>(); - for (int i = 0; i < places.length(); i++) { - LocationResult result = parsePlace(places.getJSONObject(i)); - if (result != null) { - results.add(result); - } - } - return results; - } catch (JSONException e) { - Log.e(TAG, "Received malformed places data (input=" + input + ", lang=" + language + ")", e); - } - return null; - } - - @Override - public WeatherInfo getWeatherInfo(String id, String localizedCityName, boolean metric) { - String url = String.format(URL_WEATHER, id, metric ? "c" : "f"); - String response = HttpRetriever.retrieve(url); - - if (response == null) { - return null; - } - - SAXParserFactory factory = SAXParserFactory.newInstance(); - try { - SAXParser parser = factory.newSAXParser(); - StringReader reader = new StringReader(response); - WeatherHandler handler = new WeatherHandler(); - parser.parse(new InputSource(reader), handler); - - if (handler.isComplete()) { - // There are cases where the current condition is unknown, but the forecast - // is not - using the (inaccurate) forecast is probably better than showing - // the question mark - if (handler.conditionCode == 3200) { - handler.condition = handler.forecasts.get(0).condition; - handler.conditionCode = handler.forecasts.get(0).conditionCode; - } - - WeatherInfo w = new WeatherInfo(mContext, id, - localizedCityName != null ? localizedCityName : handler.city, - handler.condition, handler.conditionCode, handler.temperature, - handler.temperatureUnit, handler.humidity, handler.windSpeed, - handler.windDirection, handler.speedUnit, handler.forecasts, - System.currentTimeMillis()); - Log.d(TAG, "Weather updated: " + w); - return w; - } else { - Log.w(TAG, "Received incomplete weather XML (id=" + id + ")"); - } - } catch (ParserConfigurationException e) { - Log.e(TAG, "Could not create XML parser", e); - } catch (SAXException e) { - Log.e(TAG, "Could not parse weather XML (id=" + id + ")", e); - } catch (IOException e) { - Log.e(TAG, "Could not parse weather XML (id=" + id + ")", e); - } - - return null; - } - - private static class WeatherHandler extends DefaultHandler { - String city; - String temperatureUnit, speedUnit; - int windDirection, conditionCode; - float humidity, temperature, windSpeed; - String condition; - ArrayList<DayForecast> forecasts = new ArrayList<DayForecast>(); - - @Override - public void startElement(String uri, String localName, String qName, Attributes attributes) - throws SAXException { - if (qName.equals("yweather:location")) { - city = attributes.getValue("city"); - } else if (qName.equals("yweather:units")) { - temperatureUnit = attributes.getValue("temperature"); - speedUnit = attributes.getValue("speed"); - } else if (qName.equals("yweather:wind")) { - windDirection = (int) stringToFloat(attributes.getValue("direction"), -1); - windSpeed = stringToFloat(attributes.getValue("speed"), -1); - } else if (qName.equals("yweather:atmosphere")) { - humidity = stringToFloat(attributes.getValue("humidity"), -1); - } else if (qName.equals("yweather:condition")) { - condition = attributes.getValue("text"); - conditionCode = (int) stringToFloat(attributes.getValue("code"), -1); - temperature = stringToFloat(attributes.getValue("temp"), Float.NaN); - } else if (qName.equals("yweather:forecast")) { - DayForecast day = new DayForecast( - /* low */ stringToFloat(attributes.getValue("low"), Float.NaN), - /* high */ stringToFloat(attributes.getValue("high"), Float.NaN), - /* condition */ attributes.getValue("text"), - /* conditionCode */ (int) stringToFloat(attributes.getValue("code"), -1)); - if (!Float.isNaN(day.low) && !Float.isNaN(day.high) && day.conditionCode >= 0) { - forecasts.add(day); - } - } - } - public boolean isComplete() { - return temperatureUnit != null && speedUnit != null && conditionCode >= 0 - && !Float.isNaN(temperature) && !forecasts.isEmpty(); - } - private float stringToFloat(String value, float defaultValue) { - try { - if (value != null) { - return Float.parseFloat(value); - } - } catch (NumberFormatException e) { - // fall through to the return line below - } - return defaultValue; - } - } - - @Override - public WeatherInfo getWeatherInfo(Location location, boolean metric) { - String language = getLanguage(); - String params = String.format(Locale.US, "\"(%f,%f)\" and lang=\"%s\"", - location.getLatitude(), location.getLongitude(), language); - String url = URL_PLACEFINDER + Uri.encode(params); - JSONObject results = fetchResults(url); - if (results == null) { - return null; - } - try { - JSONObject place = results.getJSONObject("place"); - LocationResult result = parsePlace(place); - String woeid = null; - String city = null; - if (result != null) { - woeid = result.id; - city = result.city; - } - // The city name in the placefinder result is HTML encoded :-( - if (city != null) { - city = Html.fromHtml(city).toString(); - } else { - Log.w(TAG, "Can not resolve place name for " + location); - } - - Log.d(TAG, "Resolved location " + location + " to " + city + " (" + woeid + ")"); - - WeatherInfo info = getWeatherInfo(woeid, city, metric); - if (info != null) { - return info; - } - } catch (JSONException e) { - Log.e(TAG, "Received malformed placefinder data (location=" - + location + ", lang=" + language + ")", e); - } - - return null; - } - - private LocationResult parsePlace(JSONObject place) throws JSONException { - LocationResult result = new LocationResult(); - JSONObject country = place.getJSONObject("country"); - - result.id = place.getString("woeid"); - result.country = country.getString("content"); - result.countryId = country.getString("code"); - if (!place.isNull("postal")) { - result.postal = place.getJSONObject("postal").getString("content"); - } - - for (String name : LOCALITY_NAMES) { - if (!place.isNull(name)) { - JSONObject localeObject = place.getJSONObject(name); - result.city = localeObject.getString("content"); - if (localeObject.optString("woeid") != null) { - result.id = localeObject.getString("woeid"); - } - break; - } - } - - if (Log.isLoggable(TAG, Log.VERBOSE)) { - Log.v(TAG, "JSON data " + place.toString() + " -> id=" + result.id - + ", city=" + result.city + ", country=" + result.countryId); - } - - if (result.id == null || result.city == null || result.countryId == null) { - return null; - } - - return result; - } - - private JSONObject fetchResults(String url) { - String response = HttpRetriever.retrieve(url); - if (response == null) { - return null; - } - - if (Log.isLoggable(TAG, Log.VERBOSE)) { - Log.v(TAG, "Request URL is " + url + ", response is " + response); - } - - try { - JSONObject rootObject = new JSONObject(response); - return rootObject.getJSONObject("query").getJSONObject("results"); - } catch (JSONException e) { - Log.w(TAG, "Received malformed places data (url=" + url + ")", e); - } - - return null; - } - - private String getLanguage() { - Locale locale = mContext.getResources().getConfiguration().locale; - String country = locale.getCountry(); - String language = locale.getLanguage(); - - if (TextUtils.isEmpty(country)) { - return language; - } - return language + "-" + country; - } -} |