Quellcode durchsuchen

Merge pull request #3701 from Calinou/fix-vformat-example

Fix `vformat()` example in Common engine methods and macros
Rémi Verschelde vor 5 Jahren
Ursprung
Commit
06b5afcc03
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      development/cpp/common_engine_methods_and_macros.rst

+ 2 - 1
development/cpp/common_engine_methods_and_macros.rst

@@ -89,7 +89,8 @@ To insert placeholders in localizable strings, wrap the localization macro in a
 
 .. code-block:: cpp
 
-    vformat(TTR("Couldn't open \"%s\" for reading."));
+    String file_path = "example.txt";
+    vformat(TTR("Couldn't open \"%s\" for reading."), file_path);
 
 .. note::