Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

[2.1] Adding simple Zend/I18n/Loader/Tmx #1992

Conversation

lrodziewicz
Copy link

A simple version of loader plus tests. I choose SimpleXML because the solution implemented into version 1 seemed for me over-complicated and libxml is enabled by default. I'm not an xpatch expert so there may be a better way of implementing it.
I not sure if the loader should report any incompatibilities with the standard eg. missing tuid attribute or seg node so I skipped it for now.

@weierophinney
Copy link
Member

Waiting to merge this until we have a separate branch for 2.1 development

@Freeaqingme
Copy link
Member

@weierophinney perhaps this may be a good moment to do so?

@weierophinney
Copy link
Member

New feature... I'd prefer to wait to 2.1, as we're in rc phase currently.

On Saturday, July 28, 2012, Dolf Schimmel wrote:

@weierophinney perhaps this may be a good moment to do so?


Reply to this email directly or view it on GitHub:
#1992 (comment)

Matthew Weier O'Phinney
matthew@weierophinney.net
http://mwop.net/

@Maks3w
Copy link
Member

Maks3w commented Jul 29, 2012

I added [2.1] preffix to the PR title

@Maks3w
Copy link
Member

Maks3w commented Aug 6, 2012

Hi,

We have renamed the folder for tests from Zend to ZendTest.

Can you rebase your PR to catch this change?

Thanks in advance.


foreach($result as $node) {
$attributes = $node->attributes();
// Silently skip the nodes that does not have the 'tuid' attribute
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't skip it silently, that can result in awkward error searching.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At time when I wrote this I didn't see any sensible format validation in other loaders. Any suggestion how to handle it? Just an exception? I think additional data that is not translation is not a problem so we are OK to skip it. I probably should check tmx specification for that one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @LukaszR here -- if the only bit that you're interested in are nodes with a specific attribute, skip them. Yes, it can potentially lead to hard-to-locate errors, but if you're mixing information in the file, you have to expect that.

@lrodziewicz
Copy link
Author

@Maks3w I will try to find time for this, this evening.

@ghost ghost assigned DASPRiD Sep 14, 2012
@weierophinney weierophinney reopened this Sep 14, 2012
@DASPRiD
Copy link
Member

DASPRiD commented Sep 28, 2012

Closing as there was no activity for over a month.

@DASPRiD DASPRiD closed this Sep 28, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants