diff --git a/AppKit/CPRuleEditor/CPRuleEditor.j b/AppKit/CPRuleEditor/CPRuleEditor.j index 738b67d9d..b5e57c601 100644 --- a/AppKit/CPRuleEditor/CPRuleEditor.j +++ b/AppKit/CPRuleEditor/CPRuleEditor.j @@ -80,6 +80,35 @@ var CPRuleEditorItemPBoardType = @"CPRuleEditorItemPBoardType", @n An ordered to-many relation containing the display values for the row. @n@n @c @@"criteria" @n An ordered to-many relation containing the criteria for the row. + @n@n + Localization & Positional Reordering + @n + CPRuleEditor supports complete localization of menu items and grammatical positional reordering (sentence structure layout adjustment) via strings resource files (.strings) or custom programmatic CPDictionary tables. + @n@n + Since sentence structures vary significantly across languages, the editor can dynamically reposition views (such as popups, static labels, and text fields) from left to right to form grammatically correct sentences. + @n@n + Formatting Keys (English representation): + @n @c %[%]@@ + @n Represents a popup button displaying its selected value (e.g. @c %[firstName]@@). + @n @c %@@ + @n Represents an editable text input field. + @n Static text represents a literal label placed directly inside the formatting key. + @n@n + Example English format key: + @n @c "%[firstName]@ %[is equal to]@ %@" + @n@n + Translation Patterns (Target language): + @n Positional specifiers such as @c %1$@@, @c %2$@@, @c %3$@@ dictate the visual order of views from left to right. + @n Bracketed values inside positional specifiers (e.g. @c %1$[Nombre]@@) define the localized title for popup selection items. + @n Literal text outside the specifiers (such as @c "y" or @c "und") is automatically instantiated as static text labels positioned between controls. + @n@n + Example translations: + @n@n + Spanish (Reorders to: [1: Name] y [3: Value] [2: are equal]): + @n @c "%[firstName]@ %[is equal to]@ %@" = "%1$[Nombre]@ y %3$@ %2$[son iguales]@"; + @n@n + German (Reorders to: [1: First Name] und [3: Value] [2: are equal]): + @n @c "%[firstName]@ %[is equal to]@ %@" = "%1$[Vorname]@ und %3$@ %2$[sind gleich]@"; */ @implementation CPRuleEditor : CPControl diff --git a/Tests/Manual/CPRuleEditorTestSpanish/AppController.j b/Tests/Manual/CPRuleEditorTestI8N/AppController.j similarity index 100% rename from Tests/Manual/CPRuleEditorTestSpanish/AppController.j rename to Tests/Manual/CPRuleEditorTestI8N/AppController.j diff --git a/Tests/Manual/CPRuleEditorTestSpanish/Info.plist b/Tests/Manual/CPRuleEditorTestI8N/Info.plist similarity index 100% rename from Tests/Manual/CPRuleEditorTestSpanish/Info.plist rename to Tests/Manual/CPRuleEditorTestI8N/Info.plist diff --git a/Tests/Manual/CPRuleEditorTestSpanish/Jakefile b/Tests/Manual/CPRuleEditorTestI8N/Jakefile similarity index 100% rename from Tests/Manual/CPRuleEditorTestSpanish/Jakefile rename to Tests/Manual/CPRuleEditorTestI8N/Jakefile diff --git a/Tests/Manual/CPRuleEditorTestSpanish/Resources/spinner.gif b/Tests/Manual/CPRuleEditorTestI8N/Resources/spinner.gif similarity index 100% rename from Tests/Manual/CPRuleEditorTestSpanish/Resources/spinner.gif rename to Tests/Manual/CPRuleEditorTestI8N/Resources/spinner.gif diff --git a/Tests/Manual/CPRuleEditorTestSpanish/RuleDelegate.j b/Tests/Manual/CPRuleEditorTestI8N/RuleDelegate.j similarity index 100% rename from Tests/Manual/CPRuleEditorTestSpanish/RuleDelegate.j rename to Tests/Manual/CPRuleEditorTestI8N/RuleDelegate.j diff --git a/Tests/Manual/CPRuleEditorTestSpanish/index-debug.html b/Tests/Manual/CPRuleEditorTestI8N/index-debug.html similarity index 100% rename from Tests/Manual/CPRuleEditorTestSpanish/index-debug.html rename to Tests/Manual/CPRuleEditorTestI8N/index-debug.html diff --git a/Tests/Manual/CPRuleEditorTestSpanish/index.html b/Tests/Manual/CPRuleEditorTestI8N/index.html similarity index 100% rename from Tests/Manual/CPRuleEditorTestSpanish/index.html rename to Tests/Manual/CPRuleEditorTestI8N/index.html diff --git a/Tests/Manual/CPRuleEditorTestSpanish/main.j b/Tests/Manual/CPRuleEditorTestI8N/main.j similarity index 100% rename from Tests/Manual/CPRuleEditorTestSpanish/main.j rename to Tests/Manual/CPRuleEditorTestI8N/main.j