diff --git a/apps/shared.de.i18n b/apps/shared.de.i18n index f3e846061..6de53c715 100644 --- a/apps/shared.de.i18n +++ b/apps/shared.de.i18n @@ -14,6 +14,7 @@ Deg = "gra" Deviation = "Varianz" DisplayValues = "Werte anzeigen" Empty = "Leer" +Eng = "tech" ExitExamMode1 = "Möchten Sie den Testmodus " ExitExamMode2 = "verlassen?" Exponential = "Exponentielle" @@ -51,7 +52,7 @@ PoolMemoryFull2 = "Versuchen Sie es erneut." Rad = "rad" Rename = "Umbenennen" RoundAbscissa = "Ganzzahl" -Sci = "sci/" +Sci = "sci" SquareSum = "Quadratsumme" StatTab = "Stats" StandardDeviation = "Standardabweichung" diff --git a/apps/shared.en.i18n b/apps/shared.en.i18n index 65f4c6f4f..952b615b8 100644 --- a/apps/shared.en.i18n +++ b/apps/shared.en.i18n @@ -14,6 +14,7 @@ Deg = "deg" Deviation = "Variance" DisplayValues = "Display values" Empty = "Empty" +Eng = "eng" ExitExamMode1 = "Exit the exam " ExitExamMode2 = "mode?" Exponential = "Exponential" @@ -51,7 +52,7 @@ PoolMemoryFull2 = "Try again." Rad = "rad" Rename = "Rename" RoundAbscissa = "Integer" -Sci = "sci/" +Sci = "sci" SquareSum = "Sum of squares" StandardDeviation = "Standard deviation" StoreExpressionNotAllowed = "'store' is not allowed" diff --git a/apps/shared.es.i18n b/apps/shared.es.i18n index 2b3a57535..a560ae2ac 100644 --- a/apps/shared.es.i18n +++ b/apps/shared.es.i18n @@ -14,6 +14,7 @@ Deg = "gra" Deviation = "Varianza" DisplayValues = "Visualizar los valores" Empty = "Vacio" +Eng = "ing" ExitExamMode1 = "Salir del modo " ExitExamMode2 = "examen ?" Exponential = "Exponencial" @@ -51,7 +52,7 @@ PoolMemoryFull2 = "Intente de nuevo." Rad = "rad" Rename = "Renombrar" RoundAbscissa = "Abscisas enteras" -Sci = "sci/" +Sci = "sci" SquareSum = "Suma cuadrados" StandardDeviation = "Desviación típica" StatTab = "Medidas" diff --git a/apps/shared.fr.i18n b/apps/shared.fr.i18n index d939fbe04..15e2d760c 100644 --- a/apps/shared.fr.i18n +++ b/apps/shared.fr.i18n @@ -14,6 +14,7 @@ Deg = "deg" Deviation = "Variance" DisplayValues = "Afficher les valeurs" Empty = "Vide" +Eng = "ing" ExitExamMode1 = "Voulez-vous sortir " ExitExamMode2 = "du mode examen ?" Exponential = "Exponentielle" @@ -51,7 +52,7 @@ PoolMemoryFull2 = "Réessayez." Rad = "rad" Rename = "Renommer" RoundAbscissa = "Abscisses entières" -Sci = "sci/" +Sci = "sci" SquareSum = "Somme des carrés" StandardDeviation = "Écart type" StatTab = "Stats" diff --git a/apps/shared.pt.i18n b/apps/shared.pt.i18n index 2015e6176..1eca48b6f 100644 --- a/apps/shared.pt.i18n +++ b/apps/shared.pt.i18n @@ -14,6 +14,7 @@ Deg = "gra" Deviation = "Variancia" DisplayValues = "Exibir os valores" Empty = "Vácuo" +Eng = "eng" ExitExamMode1 = "Você quer sair do modo de " ExitExamMode2 = "exame ?" Exponential = "Exponencial" @@ -51,7 +52,7 @@ PoolMemoryFull2 = "Tente novamente." Rad = "rad" Rename = "Renomear" RoundAbscissa = "Inteiro" -Sci = "sci/" +Sci = "sci" SquareSum = "Soma dos quadrados" StandardDeviation = "Desvio padrão" StatTab = "Estat" diff --git a/apps/title_bar_view.cpp b/apps/title_bar_view.cpp index 535ef018a..96a8db259 100644 --- a/apps/title_bar_view.cpp +++ b/apps/title_bar_view.cpp @@ -85,8 +85,19 @@ void TitleBarView::refreshPreferences() { char buffer[bufferSize]; int numberOfChar = 0; Preferences * preferences = Preferences::sharedPreferences(); - if (preferences->displayMode() == Preferences::PrintFloatMode::Scientific) { - numberOfChar += strlcpy(buffer, I18n::translate(I18n::Message::Sci), bufferSize); + { + // Display Sci/ or Eng/ if the print float mode is not decimal + const Preferences::PrintFloatMode printFloatMode = preferences->displayMode(); + if (printFloatMode != Preferences::PrintFloatMode::Decimal) { + // Check that there is no new print float mode, otherwise add its message + assert(printFloatMode == Preferences::PrintFloatMode::Scientific + || printFloatMode == Preferences::PrintFloatMode::Engineering); + I18n::Message printMessage = printFloatMode == Preferences::PrintFloatMode::Scientific ? I18n::Message::Sci : I18n::Message::Eng; + numberOfChar += strlcpy(buffer, I18n::translate(printMessage), bufferSize); + assert(numberOfChar < bufferSize-1); + assert(UTF8Decoder::CharSizeOfCodePoint('/') == 1); + buffer[numberOfChar++] = '/'; + } } assert(numberOfChar <= bufferSize); if (preferences->angleUnit() == Preferences::AngleUnit::Radian) {