Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Tool_Locale Component Proposal

Proposed Component Name Zend_Tool_Locale
Developer Notes
Proposers Kim Blomqvist
Zend Liaison TBD
Revision 1.0 - 1 September 2010: Initial Draft. (wiki revision: 26)

Table of Contents

1. Overview

Zend_Tool_Locale parses project source files for translation message ids. Translation resource file is created or updated according to the matches.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will create and update project translation resource files for array adapter
  • This component will support plurals
  • This component will support array keys

4. Dependencies on Other Framework Components

  • Zend_Tool_Project_Provider_Abstract

5. Theory of Operation

The component is used from CLI, like this ...

zf create locale module[=application] kwords

6. Milestones / Tasks

  • Milestone 1: [DONE] Working prototype
  • Milestone 2: Migrate to ZF2
  • Milestone 3: Working prototype checked into the incubator supporting use cases #1, #2, ...
  • Milestone 4: Working prototype checked into the incubator supporting use cases #3 and #4.
  • Milestone 5: Unit tests exist, work, and are checked into SVN.
  • Milestone 6: Initial documentation exists.

If a milestone is already done, begin the description with "[DONE]", like this:

  • Milestone #: [DONE] Unit tests ...

7. Class Index

  • Zend_Tool_Locale
  • Zend_FunctionParamParser

8. Use Cases

Test files
UC-01 Create Finnish translations
UC-02 Update with additional keywords

9. Class Skeletons



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Mar 15, 2011

    <p>Your link on GitHub is broken. I think that the new link is <a class="external-link" href=""></a>.</p>

    <p>This may be an interesting idea on paper. I never thought of that.</p>

    1. Jun 02, 2011

      <p>Thank you for comment. The github link is now fixed.</p>

      <p>I have plans to enhance the Zend_FunctionParamParser class to support file names and line numbers. With these I mean that the parser is able to tell where it found the translation message ids.</p>

  2. Jul 16, 2011

    <p>I have polished the API of the FunctionParamParser class and added a new feature that resolves the line numbers where the match occured. Next I will rewrite the tool itself and after then update this proposal page.</p>

  3. Feb 28, 2012

    <p>My FunctionParamParser should be removed and replaced by PHP-Parser (<a class="external-link" href=""></a>). In addition I think this tool should be distributed as a ZF2 module.</p>