diff --git a/apps/code/catalog.universal.i18n b/apps/code/catalog.universal.i18n index bcb3233f1..afeeb6310 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -19,7 +19,7 @@ PythonCommandBin = "bin(x)" PythonCommandCeil = "ceil(x)" PythonCommandChoice = "choice(list)" PythonCommandCmathFunction = "cmath.function" -PythonCommandCmathFunctionWithoutArg = "cmath." +PythonCommandCmathFunctionWithoutArg = "cmath.•" PythonCommandColor = "color(r,g,b)" PythonCommandComplex = "complex(a,b)" PythonCommandCopySign = "copysign(x,y)" @@ -57,7 +57,7 @@ PythonCommandIsFinite = "isfinite(x)" PythonCommandIsInfinite = "isinf(x)" PythonCommandIsNaN = "isnan(x)" PythonCommandKandinskyFunction = "kandinsky.function" -PythonCommandKandinskyFunctionWithoutArg = "kandinsky." +PythonCommandKandinskyFunctionWithoutArg = "kandinsky.•" PythonCommandLdexp = "ldexp(x,i)" PythonCommandLgamma = "lgamma(x)" PythonCommandLength = "len(object)" @@ -66,7 +66,7 @@ PythonCommandLog10 = "log10(x)" PythonCommandLog2 = "log2(x)" PythonCommandLogComplex = "log(z,a)" PythonCommandMathFunction = "math.function" -PythonCommandMathFunctionWithoutArg = "math." +PythonCommandMathFunctionWithoutArg = "math.•" PythonCommandMax = "max(list)" PythonCommandMin = "min(list)" PythonCommandModf = "modf(x)" @@ -80,7 +80,7 @@ PythonCommandRadians = "radians(x)" PythonCommandRandom = "random()" PythonCommandRandint = "randint(a,b)" PythonCommandRandomFunction = "random.function" -PythonCommandRandomFunctionWithoutArg = "random." +PythonCommandRandomFunctionWithoutArg = "random.•" PythonCommandRandrange = "randrange(start, stop)" PythonCommandRangeStartStop = "range(start, stop)" PythonCommandRangeStop = "range(stop)" @@ -100,6 +100,6 @@ PythonCommandTanh = "tanh(x)" PythonCommandTrunc = "trunc(x)" PythonCommandImag = "z.imag" PythonCommandReal = "z.real" -PythonCommandImagWithoutArg = "().imag" -PythonCommandRealWithoutArg = "().real" +PythonCommandImagWithoutArg = "•.imag" +PythonCommandRealWithoutArg = "•.real" PythonCommandUniform = "uniform(a,b)" diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index 3ceeaf2ad..85b6d0a93 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -293,7 +293,7 @@ bool PythonToolbox::selectLeaf(ToolboxMessageTree * selectedMessageTree) { const char * editedText = I18n::translate(node->insertedText()); int strippedEditedTextMaxLength = strlen(editedText)+1; char strippedEditedText[strippedEditedTextMaxLength]; - Shared::ToolboxHelpers::TextToInsertForCommandMessage(node->insertedText(), strippedEditedText, strippedEditedTextMaxLength); + Shared::ToolboxHelpers::TextToInsertForCommandMessage(node->insertedText(), strippedEditedText, strippedEditedTextMaxLength, true); sender()->handleEventWithText(strippedEditedText, true); app()->dismissModalViewController(); return true; diff --git a/apps/code/toolbox.universal.i18n b/apps/code/toolbox.universal.i18n index 86b596a02..680a88d50 100644 --- a/apps/code/toolbox.universal.i18n +++ b/apps/code/toolbox.universal.i18n @@ -20,25 +20,25 @@ NonEqualityCondition = "!=" NonEqualityConditionWithArg = "x!=y" EqualityCondition = "==" EqualityConditionWithArg = "x==y" -WhileLoop = "while ():\n " +WhileLoop = "while •:\n " WhileLoopWithArg = "while condition:\n instruction" -IfOrIfElseStatement = "if () or ():\n \nelse:\n " +IfOrIfElseStatement = "if • or :\n \nelse:\n " IfOrIfElseStatementWithArg = "if condition1 or condition2:\n instruction1\nelse:\n instruction2" -IfAndIfElseStatement = "if () and ():\n \nelse:\n " +IfAndIfElseStatement = "if • and :\n \nelse:\n " IfAndIfElseStatementWithArg = "if condition1 and condition2:\n instruction1\nelse:\n instruction2" -IfElifElseStatement = "if ():\n \nelif ():\n \nelse:\n " +IfElifElseStatement = "if •:\n \nelif :\n \nelse:\n " IfElifElseStatementWithArg = "if condition1:\n instruction1\nelif condition2:\n instruction2\nelse:\n instruction3" -IfThenStatement= "if ():\n " +IfThenStatement= "if •:\n " IfThenStatementWithArg = "if condition:\n instruction" -IfElseStatement = "if ():\n \nelse:\n " +IfElseStatement = "if •:\n \nelse:\n " IfElseStatementWithArg = "if condition:\n instruction1\nelse:\n instruction2" -ForInListLoop = "for i in ():\n " +ForInListLoop = "for i in •:\n " ForInListLoopWithArg = "for i in list:\n instruction" -ForInRange3ArgsLoop = "for i in range(,,):\n " +ForInRange3ArgsLoop = "for i in range(•,,):\n " ForInRange3ArgsLoopWithArg = "for i in range(start, stop, step):\n instruction" -ForInRange2ArgsLoop = "for i in range(,):\n " +ForInRange2ArgsLoop = "for i in range(•,):\n " ForInRange2ArgsLoopWithArg = "for i in range(start, stop):\n instruction" -ForInRange1ArgLoop = "for i in range():\n " +ForInRange1ArgLoop = "for i in range(•):\n " ForInRange1ArgLoopWithArg = "for i in range(size):\n instruction" PythonCommandDef = "def •():\n " PythonCommandDefWithArg = "def function(x):"