Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Error while parsing MO files with no context #145

qiangxue opened this Issue · 1 comment

1 participant


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!

Migrated from

earlier comments

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

set for 1.1.10 milestone

@eagleoneraptor eagleoneraptor referenced this issue from a commit in eagleoneraptor/yii
@eagleoneraptor eagleoneraptor 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.
@softark softark referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@cebe cebe referenced this issue from a commit in cebe/yii
@cebe cebe Merge branch 'master' of into 286-cdat…

* 'master' of
  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


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.