1 [
WorkbenchPluginAttribute(
"Check localisation in UI",
"Find non localised text in UI",
"ctrl+l",
"", {
"ResourceManager"})]
11 int idx = src.VarIndex(
"text");
16 if (src.Get(idx, text) && !text.Contains(
"#"))
18 m_results.Insert(
"Text = \"" + text +
"\" in Widget: " + src.GetName());
22 FindTexts(src.GetChildren());
23 FindTexts(src.GetSibling());
27 void CheckTextIDs(
string file)
29 m_module.SetOpenedResource(file);
31 int lastIndex = m_results.Count();
33 if (lastIndex != m_results.Count())
35 m_results.InsertAt(file +
":", lastIndex);
42 m_module =
Workbench.GetModule(
"ResourceManager");
43 Workbench.SearchResources(
".layout", CheckTextIDs);
45 if (m_results.Count())
48 foreach(
string file: m_results)
56 res =
"All texts are localised.";