Skip to content

Loading…

Error while parsing MO files with no context #145

Closed
qiangxue opened this Issue · 1 comment

1 participant

@qiangxue
Yii Software LLC member

Hello, I'm detected a problem while parsing MO files to use Gettext on i18n.
Apparently the CGettextMoFile::load method ignores that can exist source messages with no context in a MO file.

I'm using Yii 1.1.7.

I attach a patch that solves the problem for me.

Kind regards!
Damián

Migrated from http://code.google.com/p/yii/issues/detail?id=2288


earlier comments

qiang.xue said, at 2012-01-01T03:36:54.000Z:

set for 1.1.10 milestone

@dnohales dnohales added a commit to dnohales/yii that referenced this issue
@dnohales dnohales CGettextMoFile now takes in account the absence of context in strings.
Fix for the issue #145.
Now when pass an invalid context (eg. NULL or false) to CGettextMoFile::load
the method will get the strings without context.
a16e772
@dnohales dnohales added a commit to dnohales/yii that referenced this issue
@dnohales dnohales Modified CHANGELOG for CGettextMoFile fix (issue #145). 936fa98
@cebe cebe added a commit to cebe/yii that referenced this issue
@cebe cebe Merge branch 'master' of https://github.com/yiisoft/yii into 286-cdat…
…etimeparser-wildcard

* 'master' of https://github.com/yiisoft/yii:
  doc fixes for proper PDF creation
  Sometimes CJSON::decode returns null because native json_encode has bugs and returns null. Workaround to continue decoding when result of json_decode is null. Fixes #295
  Changelog amending, renaming CLinkPager CSS properties
  Modified CHANGELOG for CGettextMoFile fix (issue #145).
  CGettextMoFile now takes in account the absence of context in strings.
  Returned CLinkPager::CSS_* constants, fixed documentation.
  CLinkPager::CSS_* constants replaced by public properties
  tried to improve naming
  docs, rename: function -> method
  improved docs and variable names of CDetailView
  added changelog for CDetailView changes
  added @ since annotation
  improved extendability of CDetailView

Conflicts:
	CHANGELOG
b181ced
@qiangxue
Yii Software LLC member

Fixed by #388

@qiangxue qiangxue closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.