Bug 802577 - RFE: Java style variable validations in translation editor
Summary: RFE: Java style variable validations in translation editor
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: 1.6-SNAPSHOT
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.6-alpha-1
Assignee: David Mason
QA Contact: Joyce Chang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-13 00:10 UTC by David Mason
Modified: 2013-03-04 03:19 UTC (History)
3 users (show)

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-22 00:58:23 UTC
Embargoed:


Attachments (Terms of Use)

Description David Mason 2012-03-13 00:10:58 UTC
Description of problem:
Add validator for matching Java style (e.g. "{0}") variables.

Comment 1 David Mason 2012-03-15 03:02:46 UTC
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 04:43:28 UTC
verified in Zanata version 1.6-SNAPSHOT (20120329-1642).

Comment 3 David Mason 2012-06-06 03:17:24 UTC
    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.