Bug 802577 - RFE: Java style variable validations in translation editor
RFE: Java style variable validations in translation editor
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-UI (Show other bugs)
1.6-SNAPSHOT
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 1.6-alpha-1
Assigned To: David Mason
Joyce Chang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-12 20:10 EDT by David Mason
Modified: 2013-03-03 22:19 EST (History)
3 users (show)

See Also:
Fixed In Version: 1.6-SNAPSHOT (20120329-1642).
Doc Type: Bug Fix
Doc Text:
Cause Zanata does not detect inconsistencies in Java-style variables between source strings and translated strings. Consequence Translators may inadvertently enter translations that are not valid, causing compilation or runtime errors in localised builds of Java software projects. Change Added a validator to the web editor that checks for Java style variables in the source and translated strings. Java style variables use an index number and may have a format specifier. The validator checks that: - all index numbers that are present in source are present in target - all index numbers that are present in target are present in source - each index number is present the same number of times in the source and target. The validator does not yet perform any validation of format specifiers. Result A validation error is displayed near the string currently being edited if the validator is active and any of the above conditions are not met.
Story Points: 3
Clone Of:
Environment:
Last Closed: 2012-06-21 20:58:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description David Mason 2012-03-12 20:10:58 EDT
Description of problem:
Add validator for matching Java style (e.g. "{0}") variables.
Comment 1 David Mason 2012-03-14 23:02:46 EDT
Current implementation checks that all indices that are present in source are present in target, all indices present in target are present in source, and that each index is accessed the same number of times in the source and target.

This should cover the majority of strings. Yet to add checks that the same format specifiers are used between source and target.
Comment 2 Joyce Chang 2012-04-03 00:43:28 EDT
verified in Zanata version 1.6-SNAPSHOT (20120329-1642).
Comment 3 David Mason 2012-06-05 23:17:24 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
Zanata does not detect inconsistencies in Java-style variables between source strings and translated strings.

Consequence
Translators may inadvertently enter translations that are not valid, causing compilation or runtime errors in localised builds of Java software projects.

Change
Added a validator to the web editor that checks for Java style variables in the source and translated strings.

Java style variables use an index number and may have a format specifier. The validator checks that:
 - all index numbers that are present in source are present in target
 - all index numbers that are present in target are present in source
 - each index number is present the same number of times in the source and target.

The validator does not yet perform any validation of format specifiers.


Result
A validation error is displayed near the string currently being edited if the validator is active and any of the above conditions are not met.

Note You need to log in before you can comment on or make changes to this bug.