Add lv translation + fix download layout

This commit is contained in:
Victor Shcherb 2012-05-28 22:08:08 +02:00
parent 01783b6eab
commit 5a5a14e19b
4 changed files with 37 additions and 41 deletions

View file

@ -7,65 +7,65 @@ preamble - [].
%% TURNS
turn('left', ['pagriezt pa kreisi ']).
turn('left_sh', ['strauji pagriezt pa kreisi ']).
turn('left_sl', ['griezties pa kreisi ']).
turn('right', ['pagriezt pa labi ']).
turn('right_sh', ['pagriezt pa labi ']).
turn('right_sl', ['griezties pa labi ']).
turn('left', ['griezties pa kreisi ']).
turn('left_sh', ['strauji pagriezties pa kreisi ']).
turn('left_sl', ['pagriezties pa kreisi ']).
turn('right', ['griezties pa labi ']).
turn('right_sh', ['strauji pagriezties pa labi ']).
turn('right_sl', ['pagriezties pa labi ']).
prepare_turn(Turn, Dist) == ['Pçc ', D, ' pagriezties ', M] :- distance(Dist) == D, turn(Turn, M).
turn(Turn, Dist) == ['Pçc ', D, M] :- distance(Dist) == D, turn(Turn, M).
prepare_turn(Turn, Dist) == ['Pçc ', D, ' pagriezties ', M] :- distance(Dist) == D, turn(Turn, M).
turn(Turn, Dist) == ['Pçc ', D, M] :- distance(Dist) == D, turn(Turn, M).
turn(Turn) == M :- turn(Turn, M).
prepare_make_ut(Dist) == ['Gatavojaties apgriezties pçc ', D] :- distance(Dist) == D.
make_ut(Dist) == ['Pçc ', D, ' apgrieþaties '] :- distance(Dist) == D.
make_ut == ['Apgrieþaties '].
make_ut_wp == ['Apgrieþaties pie pirmâs iespçjas '].
prepare_make_ut(Dist) == ['Gatavojaties apgriezties pçc ', D] :- distance(Dist) == D.
make_ut(Dist) == ['Pçc ', D, ' apgrieþaties '] :- distance(Dist) == D.
make_ut == ['Apgrieþaties '].
make_ut_wp == ['Apgrieþaties pie pirmâs iespçjas '].
prepare_roundabout(Dist) == ['Sagatvojaties lokveida kustîbai ', D] :- distance(Dist) == D.
roundabout(Dist, _Angle, Exit) == ['Pçc ', D, ' iebrauciet lokveida krustojumâ, un tad brauciet ', E, 'pagriezienâ'] :- distance(Dist) == D, nth(Exit, E).
roundabout(_Angle, Exit) == ['turaties pa ', E, 'exit'] :- nth(Exit, E).
prepare_roundabout(Dist) == ['Sagatvojaties lokveida kustîbai ', D] :- distance(Dist) == D.
roundabout(Dist, _Angle, Exit) == ['Pçc ', D, ' iebrauciet lokveida krustojumâ, un tad brauciet ', E, 'pagriezienâ'] :- distance(Dist) == D, nth(Exit, E).
roundabout(_Angle, Exit) == ['izbrauciet ', E, 'izbrauktuvç'] :- nth(Exit, E).
go_ahead == ['Dodaties taisni uz priekðu '].
go_ahead(Dist) == ['Brauciet pa ceïu ', D]:- distance(Dist) == D.
go_ahead == ['Dodaties taisni uz priekðu '].
go_ahead(Dist) == ['Brauciet pa ceïu ', D]:- distance(Dist) == D.
and_arrive_destination == ['un ierodaties galapunktâ '].
and_arrive_destination == ['un ierodaties galapunktâ '].
then == ['then '].
reached_destination == ['jûs esiet nokïuvis galapunktâ '].
then == ['tad '].
reached_destination == ['jûs esiet nokïuvis galapunktâ '].
bear_right == ['turieties pa labi '].
bear_left == ['turieties pa kreisi '].
route_new_calc(Dist) == ['Brauciens ir ', D] :- distance(Dist) == D.
route_recalc(Dist) == ['Marðruts ir pârrçíinâts, attâlums ', D] :- distance(Dist) == D.
route_recalc(Dist) == ['Marðruts ir pârçíinâts, attâlums ', D] :- distance(Dist) == D.
location_lost == ['pazudis g p s signâls '].
location_lost == ['pazudis g p s signâls '].
%%
nth(1, 'pirmais ').
nth(2, 'otrais ').
nth(3, 'treðais ').
nth(3, 'treðais ').
nth(4, 'ceturtais ').
nth(5, 'piektais ').
nth(6, 'sestais ').
nth(7, 'septîtais ').
nth(7, 'septîtais ').
nth(8, 'astotais ').
nth(9, 'devîtais ').
nth(9, 'devîtais ').
nth(10, 'desmit ').
nth(11, 'vienpadsmitais ').
nth(12, 'divpadsmitais ').
nth(13, 'trîspadsmitais ').
nth(14, 'èetrpadsmitais ').
nth(13, 'trîspadsmitais ').
nth(14, 'èetrpadsmitais ').
nth(15, 'piecpadsmitais ').
nth(16, 'seðpadsmitais ').
nth(17, 'septiòpadsmitais ').
nth(16, 'seðpadsmitais ').
nth(17, 'septiòpadsmitais ').
%%% distance measure
distance(Dist) == [ X, ' meters'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
distance(Dist) == [ X, ' meters'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
distance(Dist) == [ X, ' meteriem'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
distance(Dist) == [ X, ' meteriem'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
distance(Dist) == ['aptuveni 1 kilometers '] :- Dist < 1500.
distance(Dist) == ['aptuveni ', X, ' kilometeri '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
distance(Dist) == [ X, ' kilometri '] :- D is round(Dist/1000), num_atom(D, X).

View file

@ -6,10 +6,10 @@
<CheckBox android:id="@+id/check_download_item" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:focusable="false" />
</LinearLayout>
<TextView android:id="@+id/download_item" android:gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content"
<TextView android:id="@+id/download_item" android:gravity="top" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:maxLines="7" android:layout_weight="1" android:textSize="16sp"></TextView>
<TextView android:id="@+id/download_descr" android:layout_marginLeft="3dp" android:gravity="center_vertical" android:layout_width="105dp"
<TextView android:id="@+id/download_descr" android:layout_marginLeft="3dp" android:gravity="top" android:layout_width="105dp"
android:layout_height="wrap_content" android:textSize="16sp" ></TextView>
</LinearLayout>

View file

@ -195,9 +195,9 @@ public class DownloadOsmandIndexesHelper {
public String getVisibleName(){
int l = fileName.lastIndexOf('_');
String name = fileName.substring(0, l < 0 ? fileName.length() : l).replace('_', ' ');
if (fileName.endsWith(".zip")) { //$NON-NLS-1$
name += " (zip)"; //$NON-NLS-1$
}
// if (fileName.endsWith(".zip")) { //$NON-NLS-1$
// name += " (zip)"; //$NON-NLS-1$
// }
return name;
}

View file

@ -15,10 +15,8 @@ import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
@ -82,8 +80,6 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
protected static final int DIALOG_PROGRESS_FILE = 1;
protected static final int DIALOG_PROGRESS_LIST = 2;
/** other **/
private static final int MB = 1 << 20;
public static final String FILTER_KEY = "filter";
private static DownloadIndexListThread downloadListIndexThread;
@ -934,7 +930,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
TextView item = (TextView) row.findViewById(R.id.download_item);
TextView description = (TextView) row.findViewById(R.id.download_descr);
IndexItem e = (IndexItem) getChild(groupPosition, childPosition);
item.setText(e.getVisibleDescription(DownloadIndexActivity.this) + "\n" + e.getVisibleName()); //$NON-NLS-1$
item.setText((e.getVisibleDescription(DownloadIndexActivity.this) + "\n" + e.getVisibleName()).trim()); //$NON-NLS-1$
description.setText(e.getDate() + "\n" + e.getSize() + " MB");
CheckBox ch = (CheckBox) row.findViewById(R.id.check_download_item);