[apps][escher] I18n

Change-Id: I4d6f40155a8a182184af9ef2a583d0469196ffd5
This commit is contained in:
Émilie Feral
2017-03-14 16:21:36 +01:00
parent a1442674c7
commit adc80cd71b
207 changed files with 1384 additions and 669 deletions

View File

@@ -1,17 +1,22 @@
#include <escher/pointer_text_view.h>
#include <assert.h>
PointerTextView::PointerTextView(KDText::FontSize size, const char * text, float horizontalAlignment, float verticalAlignment,
PointerTextView::PointerTextView(KDText::FontSize size, I18n::Message message, float horizontalAlignment, float verticalAlignment,
KDColor textColor, KDColor backgroundColor) :
TextView(size, horizontalAlignment, verticalAlignment, textColor, backgroundColor),
m_textPointer(text)
m_message(message)
{
}
const char * PointerTextView::text() const {
return m_textPointer;
return I18n::translate(m_message);
}
void PointerTextView::setText(const char * text) {
m_textPointer = text;
assert(false);
}
void PointerTextView::setMessage(I18n::Message message) {
m_message = message;
markRectAsDirty(bounds());
}
}