49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
|
/* DO NOT EDIT THIS FILE */
|
||
|
/* This file is autogenerated by the text-database code generator */
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <touchgfx/Unicode.hpp>
|
||
|
|
||
|
TEXT_LOCATION_FLASH_PRAGMA
|
||
|
KEEP extern const uint32_t indices<%= get_language %>[] TEXT_LOCATION_FLASH_ATTRIBUTE;
|
||
|
|
||
|
<% if remap_global? %>
|
||
|
// Remap all strings
|
||
|
TEXT_LOCATION_FLASH_PRAGMA
|
||
|
KEEP extern const uint32_t indices<%= get_language %>[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
||
|
<% text_entries = get_text_entries %>
|
||
|
<% if text_entries.empty? %>
|
||
|
0
|
||
|
<% else %>
|
||
|
<% text_entries.each_with_index do |entry, index| %>
|
||
|
<%= get_string_index(entry) %><%= ((index == text_entries.length - 1) ? (index == 0 ? '' : ' '): ',') %><%= get_string_index_spaces(entry)%>// <%= entry.text_id %>: "<%= unicode_array_to_string(entry.int_array) %>"
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
};
|
||
|
<% else %>
|
||
|
// Remap local strings
|
||
|
TEXT_LOCATION_FLASH_PRAGMA
|
||
|
KEEP extern const touchgfx::Unicode::UnicodeChar texts<%= get_language %>[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
||
|
<% substrings_and_offset = get_substrings_and_offsets(@language_index) %>
|
||
|
<% if substrings_and_offset.empty? %>
|
||
|
0
|
||
|
<% else %>
|
||
|
<% get_substrings_and_offsets(@language_index).each do |unicode_array, offset, last| %>
|
||
|
<%= unicode_array.map{|x|"0x%x"%x} * ', ' %><%= last ? '' : ',' %> // @<%= offset %> "<%= unicode_array_to_string(unicode_array) %>"
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
};
|
||
|
|
||
|
TEXT_LOCATION_FLASH_PRAGMA
|
||
|
KEEP extern const uint32_t indices<%= get_language %>[] TEXT_LOCATION_FLASH_ATTRIBUTE = {
|
||
|
<% text_entries = get_text_entries %>
|
||
|
<% if text_entries.empty? %>
|
||
|
0
|
||
|
<% else %>
|
||
|
<% text_entries.each_with_index do |entry, index| %>
|
||
|
<%= get_string_index(entry) %><%= ((index == text_entries.length-1) ? ' ': ',') %><%= get_string_index_spaces(entry)%>// <%= entry.text_id %>: "<%= unicode_array_to_string(entry.int_array) %>"
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
};
|
||
|
<% end %>
|