Add new ordinals array to turn instructions internationalized.
This commit is contained in:
parent
93e20c1843
commit
1e9e63ad9f
@ -53,8 +53,6 @@ struct TurnInstructionsClass {
|
||||
|
||||
//This is a hack until c++0x is available enough to use initializer lists.
|
||||
TurnInstructionsClass(string nameFile){
|
||||
// Ahora mismo la ruta estñá puesta de manera manual
|
||||
//char nameFile[] = "/home/usuario/workspace/Project-OSRM/DataStructures/languages/ES_ES.txt";
|
||||
// Declare an input file stream
|
||||
ifstream fread;
|
||||
// Open a file for only read
|
||||
@ -70,27 +68,17 @@ struct TurnInstructionsClass {
|
||||
int i = 0;
|
||||
while (!fread.eof()){
|
||||
/* Write the result in an array */
|
||||
if(i<15){
|
||||
std::string str(buffer);
|
||||
if(i<15){
|
||||
TurnStrings[i] = str;
|
||||
i++;
|
||||
}else if(i>=15 && i<26){
|
||||
Ordinals[i-15] = str;
|
||||
}
|
||||
/* Read the next line */
|
||||
i++;
|
||||
fread.getline(buffer, 128);
|
||||
}
|
||||
fread.close();
|
||||
|
||||
Ordinals[0] = "zeroth";
|
||||
Ordinals[1] = "first";
|
||||
Ordinals[2] = "second";
|
||||
Ordinals[3] = "third";
|
||||
Ordinals[4] = "fourth";
|
||||
Ordinals[5] = "fifth";
|
||||
Ordinals[6] = "sixth";
|
||||
Ordinals[7] = "seventh";
|
||||
Ordinals[8] = "eighth";
|
||||
Ordinals[9] = "nineth";
|
||||
Ordinals[10] = "tenth";
|
||||
};
|
||||
|
||||
static inline double GetTurnDirectionOfInstruction( const double angle ) {
|
||||
|
||||
@ -13,3 +13,14 @@ Enter round-about
|
||||
Leave round-about
|
||||
Stay on round-about
|
||||
Start
|
||||
zeroth
|
||||
first
|
||||
second
|
||||
third
|
||||
fourth
|
||||
fifth
|
||||
sixth
|
||||
seventh
|
||||
eighth
|
||||
nineth
|
||||
tenth
|
||||
|
||||
@ -13,3 +13,14 @@ Introduzca rotonda
|
||||
Deja rotonda
|
||||
Permanezca en rotonda
|
||||
Comenzar
|
||||
cero
|
||||
primero
|
||||
segundo
|
||||
tercero
|
||||
cuarto
|
||||
quinto
|
||||
sexto
|
||||
séptimo
|
||||
octavo
|
||||
noveno
|
||||
décimo
|
||||
|
||||
@ -13,4 +13,14 @@ Entrez rond-point
|
||||
Laissez rond-point
|
||||
Rester sur rond-point
|
||||
Commencer
|
||||
|
||||
zéro
|
||||
première
|
||||
deuxième
|
||||
troisième
|
||||
quatrième
|
||||
cinquième
|
||||
sixième
|
||||
septième
|
||||
huitième
|
||||
neuvième
|
||||
dixième
|
||||
|
||||
Loading…
Reference in New Issue
Block a user