Bug 707102 - No need to enforce locales for source documents
Summary: No need to enforce locales for source documents
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.7
Assignee: Carlos Munoz
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
: 724847 836408 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-24 04:24 UTC by Sean Flanigan
Modified: 2012-09-12 23:49 UTC (History)
4 users (show)

Fixed In Version: 1.7-SNAPSHOT (20120705-0026)
Doc Type: Bug Fix
Doc Text:
Cause: Zanata is validating the a document's source locale agaisnt the list of valid "selected locales" for the document's project. Consequence: Project maintainer can't upload documents if the source locale (en-US) is not in the list of "selected locales". Fix: Disabled source locale validation when pushing a document. Result: Documents can now be pushed with source locales not in the set of valid target locales for the project or Zanata instance.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-11 05:11:29 UTC


Attachments (Terms of Use)

Description Sean Flanigan 2011-05-24 04:24:29 UTC
Description of problem:
Project maintainer can't upload documents if the source locale (en-US) is not in the list of "selected locales".  Note: "Selected locales" is generally used by project maintainers to restrict the *target* locales, so they don't expect to put en-US into the list.

Version-Release number of selected component (if applicable):
1.3

How reproducible:
100%

Steps to Reproduce:
1. Create a project and version
2. Customise the locales list, remove en-US
3. Upload document (publican-push)
  
Actual results:
Document rejected: error: Unsupported Locale en-US for project rhn-satellite-ui and version 5.4.1. Please contract Project Maintainer.


Expected results:
Document imported

Additional info:
We *could* enforce a single "source locale" (or a list of source locales) for each project, but I doubt that it's worth implementing.  Only project maintainers have the ability to import source documents anyway.

Comment 1 Sean Flanigan 2012-07-03 04:57:09 UTC
*** Bug 724847 has been marked as a duplicate of this bug. ***

Comment 2 Sean Flanigan 2012-07-03 04:57:16 UTC
*** Bug 836408 has been marked as a duplicate of this bug. ***

Comment 3 Carlos Munoz 2012-07-03 22:51:09 UTC
Removed source locale validation. Source files can now be pushed for a language that is not necessarily available on the Zanata instance or project/version.

See:
https://github.com/zanata/zanata/commit/a23e41582561351f00d77a5540d00c73411b5ddf

Comment 4 Carlos Munoz 2012-07-03 22:51:10 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
Pushing source documents (any client) for a source locale that is not enabled in the Zanata instance or the Project/Version.

Consequence
The server rejects the push because it can't validate the source locale.

Fix
Remove the source locale validation.

Result
The server now allows pushing source documents in a source locale that is not enabled.

Comment 5 Carlos Munoz 2012-07-04 01:00:30 UTC
Reverting change in Comment 3. Source locales still need to be validated. Also adding en-US by default to the Essential Data Creator, although it won't be enabled by default.

Testing Notes:
- Source locales should still be present and active on the server when pushing (same as before).
- On freshly installed Zanata instances, en-US should automatically be created and activated, but not enabled for all projects by default.

See:
https://github.com/zanata/zanata/commit/492ba79c48e66265bc650d6d5940a8660cfa09d5
https://github.com/zanata/zanata/commit/eeab735f74408a25d852687ac77ebfeb2c0153c3

Comment 6 Carlos Munoz 2012-07-04 01:00:30 UTC
Deleted Technical Notes Contents.

Old Contents:
Cause
Pushing source documents (any client) for a source locale that is not enabled in the Zanata instance or the Project/Version.

Consequence
The server rejects the push because it can't validate the source locale.

Fix
Remove the source locale validation.

Result
The server now allows pushing source documents in a source locale that is not enabled.

Comment 7 Ding-Yi Chen 2012-07-05 04:48:45 UTC
VERIFIED with Zanata version 1.7-SNAPSHOT (20120705-0026)


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