Skip to content

Commit

Permalink
Merge pull request #11 from forrestguice/master
Browse files Browse the repository at this point in the history
samtempigis deponejojn
  • Loading branch information
verdulo authored Dec 4, 2020
2 parents d709f96 + 5993143 commit 78459d5
Show file tree
Hide file tree
Showing 32 changed files with 261 additions and 81 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### ~

### v0.13.4 (2020-11-16)
* updates translation to Brazilian Portuguese (pt-br) (#450 by naoliv).
* updates translation to Norwegian (nb) (#447 by FTno).
* updates translation to Polish and Esperanto (eo, pl) (#446 by Verdulo).

### v0.13.3 (2020-11-03)
* fixes crash in Manage Places when copying or editing places (#443).
* adds an object height slider (shadow length) to sun position dialog (#189, #442).
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ android
minSdkVersion 10
//noinspection ExpiredTargetSdkVersion,OldTargetApi
targetSdkVersion 25
versionCode 67
versionName "0.13.3"
versionCode 68
versionName "0.13.4"

buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""

Expand All @@ -43,7 +43,7 @@ android

lintOptions
{
disable 'MissingTranslation'
disable 'MissingTranslation','WrongRegion'
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
<receiver android:name=".alarmclock.AlarmNotifications">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.TIME_SET" />
<!--<action android:name="android.intent.action.TIME_SET" />-->
</intent-filter>
<intent-filter>
<action android:name="suntimeswidget.alarm.show" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public void clearActions()
{
AlertDialog.Builder dialog = new AlertDialog.Builder(context);
dialog.setMessage(context.getString(R.string.clearactions_dialog_msg))
.setNegativeButton(context.getString(android.R.string.cancel), null)
.setNegativeButton(context.getString(R.string.clearactions_dialog_cancel), null)
.setPositiveButton(context.getString(R.string.clearactions_dialog_ok),
new DialogInterface.OnClickListener()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ public void onFinished(Boolean result, AlarmClockItem item) {

} else if (Intent.ACTION_TIME_CHANGED.equals(action)) {
Log.d(TAG, "TIME_SET received");
stopSelf(startId);
// TODO: reschedule alarms (but only when deltaT is >reminderPeriod to avoid rescheduling alarms dismissed early)

} else if (AlarmNotifications.ACTION_DELETE.equals(action)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ protected void pickRingtone(@NonNull final AlarmClockItem item)
{
AlertDialog.Builder requestDialog = new AlertDialog.Builder(this);
requestDialog.setMessage(Html.fromHtml(getString(R.string.privacy_permission_storage1) + "<br/><br/>" + getString(R.string.privacy_permissiondialog_prompt)));
requestDialog.setPositiveButton(getString(android.R.string.ok), new DialogInterface.OnClickListener() {
requestDialog.setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//noinspection ConstantConditions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,10 @@ public void loadSettings(SharedPreferences prefs)

protected void saveSettings(Bundle bundle) {}

public void saveSettings(Context context) {
saveSettings(context.getSharedPreferences(PREFS_ALARMCREATE, 0));
public void saveSettings(@Nullable Context context) {
if (context != null) {
saveSettings(context.getSharedPreferences(PREFS_ALARMCREATE, 0));
}
}
public void saveSettings(SharedPreferences prefs)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ private static void colorizeButtonCompoundDrawable(int color, @NonNull Button bu
Drawable[] drawables = button.getCompoundDrawables();
for (Drawable d : drawables) {
if (d != null) {
d.mutate();
d.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ protected void pickRingtone(@NonNull final AlarmClockItem item)
{
AlertDialog.Builder requestDialog = new AlertDialog.Builder(this);
requestDialog.setMessage(Html.fromHtml(getString(R.string.privacy_permission_storage1) + "<br/><br/>" + getString(R.string.privacy_permissiondialog_prompt)));
requestDialog.setPositiveButton(getString(android.R.string.ok), new DialogInterface.OnClickListener() {
requestDialog.setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//noinspection ConstantConditions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ protected void updateActionMode(Context context, PlaceItem... items)

if (rowID.length > 1)
{
actionMode.setTitle( context.getString(R.string.configLabel_places_multiSelect, Integer.toString(rowID.length)));
actionMode.setTitle(context.getResources().getQuantityString(R.plurals.placePlural, rowID.length, rowID.length));
actionMode.setSubtitle("");

} else {
Expand Down Expand Up @@ -680,7 +680,9 @@ protected void deletePlace(final Context context, @Nullable final PlaceItem... i

final boolean multiDelete = (items.length > 1);
String title = context.getString(multiDelete ? R.string.locationdelete_dialog_title1 : R.string.locationdelete_dialog_title);
String desc = (multiDelete ? context.getString(R.string.configLabel_places_multiSelect, Integer.toString(items.length)) : items[0].location.getLabel());
String desc = (multiDelete
? context.getResources().getQuantityString(R.plurals.placePlural, items.length, items.length)
: items[0].location.getLabel());
String message = context.getString(R.string.locationdelete_dialog_message, desc);

AlertDialog.Builder confirm = new AlertDialog.Builder(context)
Expand Down Expand Up @@ -728,8 +730,7 @@ protected void offerUndoDeletePlace(Context context, final PlaceItem... deletedI
View view = getView();
if (context != null && view != null && deletedItems != null)
{
final boolean multiDelete = (deletedItems.length > 1);
Snackbar snackbar = Snackbar.make(view, multiDelete ? context.getString(R.string.locationdelete_dialog_success1, Integer.toString(deletedItems.length)) : context.getString(R.string.locationdelete_dialog_success), Snackbar.LENGTH_INDEFINITE);
Snackbar snackbar = Snackbar.make(view, context.getResources().getQuantityString(R.plurals.locationdelete_dialog_success, deletedItems.length, deletedItems.length), Snackbar.LENGTH_INDEFINITE);
snackbar.setAction(context.getString(R.string.configAction_undo), new View.OnClickListener() {
@Override
public void onClick(View v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ public static void checkCustomPermissions(@NonNull Context context)
alertDialog.setIcon(warningIcon);
alertDialog.setTitle(context.getString(R.string.security_dialog_title));
alertDialog.setMessage(context.getString(R.string.security_duplicate_permissions, permission.name, packageInfo.packageName));
alertDialog.setNeutralButton( context.getString(android.R.string.ok), new DialogInterface.OnClickListener() {
alertDialog.setNeutralButton( context.getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-v14/layout_settings_location2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
style="@android:style/Widget.ActionButton"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="?attr/icActionBack"
android:contentDescription="@android:string/cancel" />
android:contentDescription="@string/dialog_cancel" />

</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/layout_dialog_alarmitem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<ImageButton android:id="@+id/dialog_button_cancel" style="?attr/actionOverflowButtonStyle"
android:layout_width="56dp" android:layout_height="match_parent"
android:src="?attr/icActionBack" android:contentDescription="@android:string/cancel" />
android:src="?attr/icActionBack" android:contentDescription="@string/dialog_cancel" />

<TextView
android:id="@+id/dialog_title"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/layout_dialog_intent_load.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@
android:id="@+id/dialog_button_cancel"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:text="@android:string/cancel"
android:text="@string/dialog_cancel"
tools:ignore="ButtonOrder" />

<Button
style="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog"
android:id="@+id/dialog_button_accept"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:text="@android:string/ok" />
android:text="@string/dialog_ok" />

</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/layout_dialog_intent_save.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
android:id="@+id/dialog_button_cancel"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:text="@android:string/cancel"
android:text="@string/saveaction_dialog_cancel"
tools:ignore="ButtonOrder" />

<Button
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/layout_dialog_place.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<ImageButton android:id="@+id/cancel_button" style="@style/ActionButton"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="?attr/icActionBack"
android:contentDescription="@android:string/cancel" />
android:contentDescription="@string/dialog_cancel" />

</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/layout_settings_location2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<ImageButton android:id="@+id/appwidget_location_cancel"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:src="?attr/icActionBack"
android:contentDescription="@android:string/cancel" />
android:contentDescription="@string/dialog_cancel" />

</LinearLayout>

Expand Down
17 changes: 14 additions & 3 deletions app/src/main/res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,12 @@

<string name="clearactions_dialog_msg">Are you sure you want to reset to defaults?\n\nAll custom actions will be removed.</string> <!-- TODO -->
<string name="clearactions_dialog_ok">Clear</string> <!-- TODO -->
<!--<string name="clearactions_dialog_cancel">@string/dialog_cancel</string>--> <!-- "Cancel" button; uncomment to override -->
<string name="clearactions_toast">Actions reset to defaults.</string> <!-- TODO -->

<string name="saveaction_dialog_title">Add Action</string> <!-- TODO -->
<string name="saveaction_dialog_ok">Guardar</string>
<!--<string name="saveaction_dialog_cancel">@string/dialog_cancel</string>--> <!-- "Cancel" button; uncomment to override -->
<string name="saveaction_dialog_suggest">Suggest</string> <!-- TODO -->
<string name="saveaction_toast">Saved action \"%1$s\" (%2$s).</string> <!-- TODO -->

Expand Down Expand Up @@ -817,10 +819,14 @@
<string name="configLabel_places">Llocs</string> <!-- group title -->
<string name="configLabel_places_manage">Manage Places</string> <!-- group title --> <!-- TODO -->
<!--<string name="configLabel_places_emptyMsg">@string/configLabel_places</string>-->
<string name="configLabel_places_multiSelect">%s places</string> <!-- displayed in actionBar and by confirmation messags; e.g. "are you sure you want to delete '2 places'" --> <!-- TODO -->
<string name="configLabel_places_build">Afegir llocs del món</string>
<string name="configLabel_places_build_summary">Cerca locals i afegeix ciutats a la base de dades.</string>

<plurals name="placePlural">
<item quantity="one">%d place</item>
<item quantity="other">%d places</item>
</plurals> <!-- TODO -->

<string name="configAction_addPlace">Afegir</string> <!-- button (contentDescription) -->
<string name="configAction_copyPlace">Copiar</string> <!-- button (contentDescription) -->
<string name="configAction_selectPlace">Seleccionar</string> <!-- button (contentDescription) -->
Expand Down Expand Up @@ -1175,8 +1181,10 @@
<string name="locationdelete_dialog_title">Remove Place?</string> <!-- title; remove 1 place --> <!-- TODO -->
<string name="locationdelete_dialog_title1">Remove Places?</string> <!-- title; remove multiple places --> <!-- TODO -->
<string name="locationdelete_dialog_message">Are you sure you want to remove %s?</string> <!-- TODO -->
<string name="locationdelete_dialog_success">Place was removed.</string> <!-- toast --> <!-- TODO -->
<string name="locationdelete_dialog_success1">%s places were removed.</string> <!-- toast; e.g. 2 places were deleted --> <!-- TODO -->
<plurals name="locationdelete_dialog_success">
<item quantity="one">Place was removed.</item>
<item quantity="other">%d places were removed.</item>
</plurals> <!-- TODO -->
<string name="locationdelete_dialog_ok">Remove</string> <!-- TODO -->
<string name="locationdelete_dialog_cancel">Canceŀlar</string>

Expand Down Expand Up @@ -1368,6 +1376,9 @@
<string name="feature_not_supported_by_source">Aquesta caracteristica no està suportada per la font de dades actual.</string>
<string name="reboot_required_message">És possible que es necessiti reiniciar per fer efectius els canvis.</string>

<string name="dialog_ok">OK</string> <!-- TODO -->
<string name="dialog_cancel">Canceŀlar</string>

<!-- calculator implementations -->
<string name="calculator_displayString_sunrisesunsetlib">github.com/mikereedell/sunrisesunsetlib-java</string>
<string name="calculator_displayString_caarmensunrisesunset">github.com/caarmen/SunriseSunset</string>
Expand Down
17 changes: 14 additions & 3 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,12 @@

<string name="clearactions_dialog_msg">Are you sure you want to reset to defaults?\n\nAll custom actions will be removed.</string> <!-- TODO -->
<string name="clearactions_dialog_ok">Clear</string> <!-- TODO -->
<!--<string name="clearactions_dialog_cancel">@string/dialog_cancel</string>--> <!-- "Cancel" button; uncomment to override -->
<string name="clearactions_toast">Actions reset to defaults.</string> <!-- TODO -->

<string name="saveaction_dialog_title">Add Action</string> <!-- TODO -->
<string name="saveaction_dialog_ok">Save</string> <!-- TODO -->
<!--<string name="saveaction_dialog_cancel">@string/dialog_cancel</string>--> <!-- "Cancel" button; uncomment to override -->
<string name="saveaction_dialog_suggest">Suggest</string> <!-- TODO -->
<string name="saveaction_toast">Saved action \"%1$s\" (%2$s).</string> <!-- TODO -->

Expand Down Expand Up @@ -820,10 +822,14 @@
<string name="configLabel_places">Orte</string> <!-- group title -->
<string name="configLabel_places_manage">Manage Places</string> <!-- group title --> <!-- TODO -->
<!--<string name="configLabel_places_emptyMsg">@string/configLabel_places</string>-->
<string name="configLabel_places_multiSelect">%s places</string> <!-- displayed in actionBar and by confirmation messags; e.g. "are you sure you want to delete '2 places'" --> <!-- TODO -->
<string name="configLabel_places_build">Orte hinzufügen</string>
<string name="configLabel_places_build_summary">Untersuche Gebietsschemata und füge Städe zur Datenbank hinzu.</string>

<plurals name="placePlural">
<item quantity="one">%d place</item>
<item quantity="other">%d places</item>
</plurals> <!-- TODO -->

<string name="configAction_addPlace">Add</string> <!-- button (contentDescription) --> <!-- TODO -->
<string name="configAction_copyPlace">Copy</string> <!-- button (contentDescription) --> <!-- TODO -->
<string name="configAction_selectPlace">Select</string> <!-- button (contentDescription) --> <!-- TODO -->
Expand Down Expand Up @@ -1157,8 +1163,10 @@
<string name="locationdelete_dialog_title">Remove Place?</string> <!-- title; remove 1 place --> <!-- TODO -->
<string name="locationdelete_dialog_title1">Remove Places?</string> <!-- title; remove multiple places --> <!-- TODO -->
<string name="locationdelete_dialog_message">Are you sure you want to remove %s?</string> <!-- TODO -->
<string name="locationdelete_dialog_success">Place was removed.</string> <!-- toast --> <!-- TODO -->
<string name="locationdelete_dialog_success1">%s places were removed.</string> <!-- toast; e.g. 2 places were deleted --> <!-- TODO -->
<plurals name="locationdelete_dialog_success">
<item quantity="one">Place was removed.</item>
<item quantity="other">%d places were removed.</item>
</plurals> <!-- TODO -->
<string name="locationdelete_dialog_ok">Remove</string> <!-- TODO -->
<string name="locationdelete_dialog_cancel">Cancel</string> <!-- TODO -->

Expand Down Expand Up @@ -1349,6 +1357,9 @@
<string name="feature_not_supported_by_source">Diese Funktion wird nicht von der aktuellen Datenquelle unterstützt.</string>
<string name="reboot_required_message">Ein Neustart ist möglicherweise nötig, damit die Änderungen wirksam werden.</string>

<string name="dialog_ok">OK</string> <!-- TODO -->
<string name="dialog_cancel">Abbrechen</string> <!-- TODO: verify -->

<!-- calculator implemenations -->
<string name="calculator_displayString_sunrisesunsetlib">github.com/mikereedell/sunrisesunsetlib-java</string>
<string name="calculator_displayString_caarmensunrisesunset">github.com/caarmen/SunriseSunset</string>
Expand Down
Loading

0 comments on commit 78459d5

Please sign in to comment.