mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
I18N
- Removed unnecessary string termination and exceptions. - Removed associated localized errors.
This commit is contained in:
parent
d37937d970
commit
1ae4ea2ea3
9 changed files with 1 additions and 44 deletions
|
@ -881,10 +881,6 @@
|
|||
#define STRING_TDB2_UNDO_SYNCED "Kann Änderung nicht rückgängig machen, weil die Aufgabe bereits abgeglichen wurde. Aufgabe stattdessen löschen."
|
||||
#define STRING_TDB2_DIRTY_EXIT "Beende mit ungeschriebenen Änderungen auf {1}"
|
||||
|
||||
// utf8
|
||||
#define STRING_UTF8_INVALID_CP_REP "Ungültige Codepoint-Darstellung."
|
||||
#define STRING_UTF8_INVALID_CP "Ungültiger Unicode-Codepoint."
|
||||
|
||||
// View
|
||||
#define STRING_VIEW_TOO_SMALL "Dieser Report hat eine Mindestbreite von {1} und passt nicht in die Bildschirmbreite von {2}."
|
||||
|
||||
|
|
|
@ -881,10 +881,6 @@
|
|||
#define STRING_TDB2_UNDO_SYNCED "Cannot undo change because the task was already synced. Modify the task instead."
|
||||
#define STRING_TDB2_DIRTY_EXIT "Exiting with unwritten changes to {1}"
|
||||
|
||||
// utf8
|
||||
#define STRING_UTF8_INVALID_CP_REP "Invalid codepoint representation."
|
||||
#define STRING_UTF8_INVALID_CP "Invalid Unicode codepoint."
|
||||
|
||||
// View
|
||||
#define STRING_VIEW_TOO_SMALL "The report has a minimum width of {1} and does not fit in the available width of {2}."
|
||||
|
||||
|
|
|
@ -881,10 +881,6 @@
|
|||
#define STRING_TDB2_UNDO_SYNCED "Ne povos malfari ŝanĝon ĉar la tasko estis jam sinkronigita. Modifu anstataŭe la taskon."
|
||||
#define STRING_TDB2_DIRTY_EXIT "Eliranta kun neskribitajn ŝanĝojn al {1}"
|
||||
|
||||
// utf8
|
||||
#define STRING_UTF8_INVALID_CP_REP "Nevalida kodpunkta nombro."
|
||||
#define STRING_UTF8_INVALID_CP "Nevalida unikoda kodpunkto."
|
||||
|
||||
// View
|
||||
#define STRING_VIEW_TOO_SMALL "La raporto havas larĝecminimumon {1}, al kio ne konformas la disponebla larĝeco {2}."
|
||||
|
||||
|
|
|
@ -891,10 +891,6 @@
|
|||
#define STRING_TDB2_UNDO_SYNCED "No se puede deshacer el cambio porque la tarea ya ha sido sincronizada. Como alternativa, modifique la tarea."
|
||||
#define STRING_TDB2_DIRTY_EXIT "Exiting with unwritten changes to {1}"
|
||||
|
||||
// utf8
|
||||
#define STRING_UTF8_INVALID_CP_REP "Representación de codepoint no válida."
|
||||
#define STRING_UTF8_INVALID_CP "Codepoint Unicode no válido."
|
||||
|
||||
// View
|
||||
#define STRING_VIEW_TOO_SMALL "El informe tiene una anchura mínima de {1} y no cabe en la disponible, que es {2}."
|
||||
|
||||
|
|
|
@ -881,10 +881,6 @@
|
|||
#define STRING_TDB2_UNDO_SYNCED "Impossible d'annuler les changements car la tâche a déjà été synchronysée. Modifiez plutôt la tâche."
|
||||
#define STRING_TDB2_DIRTY_EXIT "Exiting with unwritten changes to {1}"
|
||||
|
||||
// utf8
|
||||
#define STRING_UTF8_INVALID_CP_REP "Invalid codepoint representation."
|
||||
#define STRING_UTF8_INVALID_CP "Invalid Unicode codepoint."
|
||||
|
||||
// View
|
||||
#define STRING_VIEW_TOO_SMALL "The report has a minimum width of {1} and does not fit in the available width of {2}."
|
||||
|
||||
|
|
|
@ -880,10 +880,6 @@
|
|||
#define STRING_TDB2_UNDO_SYNCED "Cannot undo change because the task was already synced. Modify the task instead."
|
||||
#define STRING_TDB2_DIRTY_EXIT "Exiting with unwritten changes to {1}"
|
||||
|
||||
// utf8
|
||||
#define STRING_UTF8_INVALID_CP_REP "Rappresentazione non valida del codepoint."
|
||||
#define STRING_UTF8_INVALID_CP "Codepoint Unicode non valido."
|
||||
|
||||
// View
|
||||
#define STRING_VIEW_TOO_SMALL "Il report ha larghezza minima di {1} e non entra nella larghezza disponibile di {2}."
|
||||
|
||||
|
|
|
@ -881,10 +881,6 @@
|
|||
#define STRING_TDB2_UNDO_SYNCED "Nie można cofnąć zmian ponieważ zadanie zostało zsynchronizowane. Zmodyfikuj zadanie."
|
||||
#define STRING_TDB2_DIRTY_EXIT "Zamykanie z niezapisanymi zmianami w {1}"
|
||||
|
||||
// utf8
|
||||
#define STRING_UTF8_INVALID_CP_REP "Niepoprawna reprezentacja znaku."
|
||||
#define STRING_UTF8_INVALID_CP "Niepoprawny znak Unicode."
|
||||
|
||||
// View
|
||||
#define STRING_VIEW_TOO_SMALL "Raport ma minimalną szerokość {1} i nie mieści się w dostępnej przestrzeni {2}."
|
||||
|
||||
|
|
|
@ -881,10 +881,6 @@
|
|||
#define STRING_TDB2_UNDO_SYNCED "Não é possível reverter a alteração porque a tarefa já foi syncronizada. Em vez disso modifique a tarefa."
|
||||
#define STRING_TDB2_DIRTY_EXIT "Saindo com modificações por gravar de {1}"
|
||||
|
||||
// utf8
|
||||
#define STRING_UTF8_INVALID_CP_REP "Representação de 'codepoint' inválida."
|
||||
#define STRING_UTF8_INVALID_CP "'Codepoint' Unicode inválido."
|
||||
|
||||
// View
|
||||
#define STRING_VIEW_TOO_SMALL "O relatório tem uma largura mínima de {1} e não cabe na largura disponível {2}."
|
||||
|
||||
|
|
13
src/utf8.cpp
13
src/utf8.cpp
|
@ -26,9 +26,7 @@
|
|||
|
||||
#include <cmake.h>
|
||||
#include <string>
|
||||
#include <text.h>
|
||||
#include <utf8.h>
|
||||
#include <i18n.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Converts '0' -> 0
|
||||
|
@ -66,8 +64,6 @@ unsigned int utf8_codepoint (const std::string& input)
|
|||
XDIGIT (input[2]) << 4 |
|
||||
XDIGIT (input[3]);
|
||||
}
|
||||
else
|
||||
throw std::string (STRING_UTF8_INVALID_CP_REP);
|
||||
|
||||
return codepoint;
|
||||
}
|
||||
|
@ -117,13 +113,12 @@ unsigned int utf8_next_char (const std::string& input, std::string::size_type& i
|
|||
// http://en.wikipedia.org/wiki/UTF-8
|
||||
std::string utf8_character (unsigned int codepoint)
|
||||
{
|
||||
char sequence[5];
|
||||
char sequence[5] = {0};
|
||||
|
||||
// 0xxxxxxx -> 0xxxxxxx
|
||||
if (codepoint < 0x80)
|
||||
{
|
||||
sequence[0] = codepoint;
|
||||
sequence[1] = 0;
|
||||
}
|
||||
|
||||
// 00000yyy yyxxxxxx -> 110yyyyy 10xxxxxx
|
||||
|
@ -131,7 +126,6 @@ std::string utf8_character (unsigned int codepoint)
|
|||
{
|
||||
sequence[0] = 0xC0 | (codepoint & 0x7C0) >> 6;
|
||||
sequence[1] = 0x80 | (codepoint & 0x3F);
|
||||
sequence[2] = 0;
|
||||
}
|
||||
|
||||
// zzzzyyyy yyxxxxxx -> 1110zzzz 10yyyyyy 10xxxxxx
|
||||
|
@ -140,7 +134,6 @@ std::string utf8_character (unsigned int codepoint)
|
|||
sequence[0] = 0xE0 | (codepoint & 0xF000) >> 12;
|
||||
sequence[1] = 0x80 | (codepoint & 0xFC0) >> 6;
|
||||
sequence[2] = 0x80 | (codepoint & 0x3F);
|
||||
sequence[3] = 0;
|
||||
}
|
||||
|
||||
// 000wwwzz zzzzyyyy yyxxxxxx -> 11110www 10zzzzzz 10yyyyyy 10xxxxxx
|
||||
|
@ -150,12 +143,8 @@ std::string utf8_character (unsigned int codepoint)
|
|||
sequence[1] = 0x80 | (codepoint & 0x03F000) >> 12;
|
||||
sequence[2] = 0x80 | (codepoint & 0x0FC0) >> 6;
|
||||
sequence[3] = 0x80 | (codepoint & 0x3F);
|
||||
sequence[4] = 0;
|
||||
}
|
||||
else
|
||||
throw std::string (STRING_UTF8_INVALID_CP);
|
||||
|
||||
sequence[4] = '\0';
|
||||
return std::string (sequence);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue