MCPcopy
hub / github.com/arduino/Arduino / tr

Method tr

arduino-core/src/processing/app/I18n.java:73–90  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

71 }
72
73 public static String tr(String s) {
74 String res;
75 try {
76 if (i18n == null)
77 res = s;
78 else
79 res = i18n.getString(s);
80 } catch (MissingResourceException e) {
81 res = s;
82 }
83
84 // The single % is the arguments selector in .PO files.
85 // We must put double %% inside the translations to avoid
86 // getting .PO processing in the way.
87 res = res.replace("%%", "%");
88
89 return res;
90 }
91
92 public static String format(String fmt, Object... args) {
93 // Single quote is used to escape curly bracket arguments.

Callers 15

I18nClass · 0.95
initMethod · 0.95
unusedStringsMethod · 0.95
uploadMethod · 0.80
findCompiledSketchMethod · 0.80
CompilerClass · 0.80
callArduinoBuilderMethod · 0.80
saveHexMethod · 0.80
execMethod · 0.80
messageMethod · 0.80
messageMethod · 0.80
DiscoveryManagerMethod · 0.80

Calls 1

replaceMethod · 0.80

Tested by 1