Skip to content


Internationalized all messages #6

wants to merge 248 commits into from
  • added german translations
  • to make dates internationalized, too, the setlocale(LC_TIME, Translatable::get_current_locale() . ".UTF8"); should be set in the mysite/code/Page.php ContentController's init function
ajoneil and others added some commits
@ajoneil ajoneil Move blog to open source path bbd2815
@halkyon halkyon check if the method exists before jumping into the foreach loop. was …
…causing problems in some situations
@ajoneil ajoneil Use short tags aae5507
@ajoneil ajoneil We don't provide an area to add content in the CMS, so dont display i…
…t on the blog holder
@ajoneil ajoneil #1500 - Infinite loop in Blog's RSS widget acd6e1a
Jeremy Shipman Commenting blog 408cf5c
Jeremy Shipman Commenting blog 5786b6d
@ajoneil ajoneil Don't set the url segment, as it capitalises 4adb767
@ajoneil ajoneil support for rel-tag microformat 9daebb0
@ajoneil ajoneil Support for rel-tag microformat 85ded9d
Jeremy Shipman ambiguous SQL fix 641d35c
@sminnee sminnee Added BlogEntry::allow_wysiwyg_editing() for people who don't want to…
… use BBCode
Will Rossiter d10e859
@halkyon halkyon Added newsletter sign up and confirm functionality (as required) and …
@halkyon halkyon Newsletter changes for blogholders 2c6edcf
@ajoneil ajoneil v.golev: #1982 - Blog module i18n patch 6229b89
@ajoneil ajoneil use microformat style tags in tagcloud abcb951
@ajoneil ajoneil fix incorrect usage of _t fbe5559
@halkyon halkyon Added return false otherwise it won't redirect 1058c98
@ajoneil ajoneil We don't need to escape the summary before parsing bbcode, as the par…
…ser does that for us
@halkyon halkyon Moved NewsletterSignupForm to the object, made a link to this from th…
…e blogentry page
@halkyon halkyon Added RSS feed icon to blog module 57bde0b
@halkyon halkyon Instead of directly checking ClassName, check if an instance instead 10f5213
@halkyon halkyon Don't show the NewsletterSignupForm unless there is a newsletter rela…
…ted to a BlogHolder that exists
@halkyon halkyon Added as an example how to customis…
…e, added themedCSS requirements to controller
@halkyon halkyon Abstracted fields onto BlogRole from subscribe form, added some docum…
…entation about what it does
@ajoneil ajoneil Fix typo 1dca741
@ajoneil ajoneil Remove debug message 9590b35
@ajoneil ajoneil Fix RSS feed when using WYSIWYG editing 43fd906
@ajoneil ajoneil simon_w: #2123 - Blog RSS sorted by date b819135
Jeremy Shipman Date format bug #1941 36a6d03
Jeremy Shipman fixed pagination bug 3505c31
Jeremy Shipman Fixed date ranges for archive blogs 5d10b75
@madmatt madmatt 4423407
@madmatt madmatt Changed Tag Cloud site name to Tag Cloud. 33471e3
Will Rossiter 99b3127
Will Rossiter Removed custom title and method in favour of using defaults 293dd54
Will Rossiter now I see why you need that title function. So added it back 9da8415
@chillu chillu updated en_US master entities 60e4f4c
@sminnee sminnee Added editable Title field to TagCloudWidget 6a3225d
@sminnee sminnee Reverted previous change e3eeffa
@sminnee sminnee Added editable Title field to TagCloudWidget 9289d6e
@sminnee sminnee Added LandingPageFreshness variable to blog holder, which lets author…
…s choose which entries to show on the landing page
Will Rossiter browse by tag was not working. b1e4d27
Will Rossiter fixed the show by tag 55e1174
@chillu chillu Initialized merge tracking via "svnmerge" with revisions "1-48513" from
@chillu chillu Merged revisions 56170 via svnmerge from

  r56170 | ischommer | 2008-06-13 11:25:35 +1200 (Fri, 13 Jun 2008) | 1 line
  BUGFIX Adding getAbsoluteRssURL() to RSSWidget to avoid SimplePie confusion on relative URLs (causes timeouts)
@chillu chillu Initialized merge tracking via "svnmerge" with revisions "1-56177" from
@chillu chillu Blocked revisions 56311 via svnmerge
  r56311 | ischommer | 2008-06-16 19:44:49 +1200 (Mon, 16 Jun 2008) | 1 line
  creating project branch
@chillu chillu MINOR Updated language master table b02d83c
@chillu chillu FEATURE (by simon_w) Add LeftAndMain::require_css()/require_javascrip…
…t/require_themed_css() for easier customization in CMS (patch from #2636)

ENHANCEMENT Applied LeftAndMain::require_javascript() to blog bbcodehelp.js
@chillu chillu API CHANGE Changed BlogEntry->Tags() to TagsCollection() to avoid con…
…fusion with the property "Tags" which is of DBField type "Text" (not DataObjectSet) - necessary to adjust to changed DataObject-write() behaviour of using DBField instances to write the value (rather than directly editing the SQL manipulation). See r52927 for details.
@sminnee sminnee d66b6e3
@sminnee sminnee Only call LeftAndMain::require_javascript() if that method exists - a…
…llows blog module compatibility with 2.2.2
@halkyon halkyon API CHANGE Removed Newsletter references in blog module. This shouldn…
…'t be in here because it's easy enough to create one on a per-project basis
@halkyon halkyon 2b64a33
@halkyon halkyon BUGFIX Renamed Tags in TagCloudWidget->Tags() to TagsCollection() whi…
…ch is less confusing and now renders the tags correctly
@halkyon halkyon MINOR whitespace 54f0af8
@halkyon halkyon MINOR invalid use of single quotes as HTML
MINOR whitespace in PHP cleanup
@halkyon halkyon MINOR whitespace cleanup a154851
@halkyon halkyon MINOR More whitespace cleanup 9d959c6
@halkyon halkyon MINOR fixed template messup in c8448e7
@halkyon halkyon MINOR more and more whitespace cleanup 5fe008c
@halkyon halkyon c4e0905
@halkyon halkyon BUGFIX BlogEntry ParsedContent had doubled up paragraph tags 203acb4
@halkyon halkyon ENHANCEMENT Allow Blog RSS feed to be named by CMS field on BlogHolde…
…r. If it's not set, then fall back to using "mysite blog" or whatever the global $project variable is set to
@halkyon halkyon ENHANCEMENT Added default english text for POSTEDBY language entity 2573559
@ajoneil ajoneil Use MONTH() and YEAR() SQL functions to check date on entries.
Refactored BlogEntries() to be more testable.
Added tests for Entries().
@ajoneil ajoneil FEATURE: Added receiving of TrackPack pings b05a3a2
@ajoneil ajoneil Show TrackBack ping URL 0e38bbc
@halkyon halkyon BUGFIX Missing Hierarchy and Versioned extensions because of overload…
…ed $extensions variable
@chillu chillu MINOR Added or updated README information (mostly with maintainer con…
@chillu chillu MINOR Updated language master table c17a1ff
@chillu chillu MINOR Updated entities from 7798cd0
@chillu chillu MINOR Misc deprecation fixes 4f7c9b3
@chillu chillu BUGFIX Fixing usage of deprecated APIs d3c7ad4
@halkyon halkyon BUGFIX Check if SimplePie exists before attempting to create a new in…
…stance of it, since it's a 3rd party class
@halkyon halkyon MINOR whitespace change c333158
Will Rossiter BUGFIX: default child needs to be a string rather then an array 8f037c4
@chillu chillu MINOR Collecting entities for language master table with new i18nText…
…Collector functionality. The table is now sorted alphabetically by namespace and entity. Entities now include more translatable statics from DataObject subclasses like $db, $has_one etc.
@chillu chillu MINOR Updated master language tables 095d410
@halkyon halkyon BUGFIX Fixed possible Member::currentUser() problem with inconsistent…
… function names
@halkyon halkyon BUGFIX Fixed some potential security issues in BlogHolder page type 224fe02
@sminnee sminnee Removed no longer necessary LeftAndMain::require_javascript() call. 4501f30
@halkyon halkyon ENHANCEMENT Added empty relationship statics so BlogEntry can be deco…
…rated by a DataObjectDecorator
@halkyon halkyon ENHANCEMENT Added empty statics to BlogHolder to allow for decoration…
… of BlogHolder
@halkyon halkyon BUGFIX If WYSIWYG editing enabled, don't attempt to parse the content…
…, just return the HTML instead

MINOR HTML code formatting in
@halkyon halkyon ENHANCEMENT Added IsWYSIWYGEnabled() to check if it's enabled or not,…
… used for templates to determine whether to return parsed content or just standard HTML
@phalkunz phalkunz Added LegacyID. Used for blog migration efbe524
@phalkunz phalkunz Moved LegacyIDs from BlogEntry and File to Decorators 0ba0c52
@ajoneil ajoneil Reverted changes that shouldnt be in core bda7fd1
Will Rossiter MINOR: tidied up blog pagination template cb0ca45
Will Rossiter MINOR: comment improvements and fixes 3f50a8e
@phalkunz phalkunz Use pagination summary function 72b1473
@phalkunz phalkunz Changed ... to html entiries …
PaginationSummary return all pages by default
@chillu chillu BUGFIX Adjusted blog pagination to new PaginationSummary syntax (see …
@halkyon halkyon BUGFIX Fix RSS feeds in RSSWidget not working. Since SimplePie has ma…
…nifest_excluse, we need to include the SimplePie.php file manually in order to use the SimplePie class for RSSWidget->FeedItems()
@halkyon halkyon ENHANCEMENT Addition of Date, so date can be used in the RSS feed
ENHANCEMENT Allow casting of Date and Title so can be modified in template
@halkyon halkyon MINOR Added RSS feed icon 28x28 for general purpose 684287e
@halkyon halkyon ENHANCEMENT Added SubscribeRSSWidget for linking directly to blog RSS…
… from the BlogHolder
phalkunz and others added some commits
@phalkunz phalkunz BUGFIX: trackbackping generated an exception. getExtensionInstance re…
…turns an instance with NULL owner so TrackBackDecorator->owner->ID was always unavailable
@rixth rixth 7fe8c11
@phalkunz phalkunz BUGFIX: prevet calling loadDescendantBlogHolderIDListInto() on BlogPa…
…ge and its subclass
@halkyon halkyon MINOR Fixed undefined Month in ArchiveWidget 56be6ad
@geoff-silverstripe geoff-silverstripe MINOR FIX: instances where no SideBarID exists are now avoided acbce1d
@geoff-silverstripe geoff-silverstripe MINOR FIX: query changed to remove duplicate results 1a56611
@halkyon halkyon BUGFIX Fixed "tag" action not allowed on BlogHolder_Controller c37785c
@cbarberis cbarberis Added true in array_slice to fix problem displaying tags 53bd0fe
@chillu chillu MINOR Updated master language tables 9462d24
@chillu chillu MINOR Added 'index' to $allowed_actions on BlogHolder, BlogTree, Blog…
…Entry to comply to new RequestHandler API
@chillu chillu MINOR More robust login mocking in BlogHolderFunctionalTest b4b1c5f
@phalkunz phalkunz MINOR: wrap current page number in SPAN tag for easy staling 549603e
@halkyon halkyon ENHANCEMENT Allow BlogEntry::getCMSFields() fields to be manipulated …
…on decorators
@ajoneil ajoneil BUGFIX: Fix updateCMSFields() being called twice on BlogEntries e688e06
James Kirkus-Lamont MINOR: moved rss feed link to its own function to allow extensions to…
… override
@sminnee sminnee BUGFIX: Updated blog module to support 2.4 API changes 9545d4f
@ajoneil ajoneil BUGFIX: Fix tag links when blog is on home pages 1af9faf
@ajoneil ajoneil BUGFIX: fix archive links 42beb23
@lingo lingo Updates to blog to work with Sapphire 2.4 c14ff38
@lingo lingo Updated language packs to fixed versions dd632af
@cbarberis cbarberis BUGFIX: using Controller::curr instead Director::get_current_page to …
…work with 2.3 and 2.4
@ajoneil ajoneil APICHANGE: Drop 2.3 support - 0.3 will be 2.4 only 10d15e1
@ajoneil ajoneil APICHANGE: WYSIWYG editing by default 67b159e
@ajoneil ajoneil FEATURE: Preliminary MetaWeblog support 5220e06
@lingo lingo BUGFIX: Extend URL length from 50 to 2048 chars 5dbbcae
@ajoneil ajoneil Allow extending of blog holder fields e52171b
@ajoneil ajoneil Use "date" for archives, using numbers directly causes too many problems a7f024b
@phalkunz phalkunz MINOR: correct the path to SimplePie include eb1dc80
@chillu chillu BUGFIX Limiting BlogHolder->LandingPageFreshness to requests without …
…a controller action only. Controller actions are not regarded as the "landing page", as they cause other views like 'tags' or 'rss', which shouldn't be filtered
@ajoneil ajoneil BUGFIX: Remove test that is no longer needed b280224
@phalkunz phalkunz MINOR: renames to so that blog tree will ha…
…ve a template while the template still applies to blog holder
Andreas Piening MINOR: substituted proprietary SQL datetime operation aa32a6a
@phalkunz phalkunz MINOR: revert r97442 2a9ea56
Andreas Piening MINOR: added datetime helper function 54b1c07
@ajoneil ajoneil BUGFIX: Sometimes link doesnt work correctly 0bf95f2
@chillu chillu ENHANCEMENT Adjusted BlogEntry to new DatetimeField API replacing Pop…
@halkyon halkyon ENHANCEMENT Blog widgets now respect updateCMSFields - related to r99929 3198619
@geoff-silverstripe geoff-silverstripe BUG FIX: month calculation system fixed to be database-agnostic c23b493
@geoff-silverstripe geoff-silverstripe BUG FIX: table and column names quoted properly 5d2019f
@rixth rixth MINOR improve test coverage c31bb7e
@geoff-silverstripe geoff-silverstripe BUGFIX: columns quoted properly 7ca1e34
@chillu chillu MINOR Fixed BlogHolderFunctionalTest to work with nested urls 4c91dff
@sminnee sminnee MINOR Fixed BlogHolderFunctionalTest links 8585403
@geoff-silverstripe geoff-silverstripe BUG FIX: date checks now database agnostic 23e817f
@felipesilverstripe felipesilverstripe blog theme d38dc82
Will Rossiter Reverted previous commit by fskroski aebe342
Will Rossiter FEATURE: added NextBlogEntry() and PreviousBlogEntry() functions to a…
…llow getting the next / previous posts by date in the template using $NextBlogEntry and $PreviousBlogEntry respectively
Will Rossiter APICHANGE: removed BlogTree_URL class and its little static children.…
… Changed to SelectedTag and SelectedDate to allow to be called in the template. SelectedDate now also returns a Date object rather than a string. BUGFIX: fixed missing Viewing posts by date text and added a viewing by post date text.
Will Rossiter BUGFIX: restored filtering by Author to the entries function 3e952fe
@phalkunz phalkunz ENHANCEMENT: display only members of Administrators and Blog Manageme…
…nt groups in the blog holder's blog owners dropdown field

FEATURE: allow blog owner customisation
@phalkunz phalkunz MINOR: add breadcrumbs Inlcude to blog template cd1e29c
Will Rossiter BUGFIX: fixed link rewriting on summary page c681ba3
@cbarberis cbarberis BUGFIX: Deleted old js from BlogHolder
ENHANCEMENT: do not show blog management widget when not logged in (ticket #5561 thanks ericdrex)
@cbarberis cbarberis ENHANCEMENT: replaced deprecated Director::urlParams()
BUGFIX: tag working with nested urls
@cbarberis cbarberis ENHANCEMENT: created BlogTree default template 1d4d7c8
@cbarberis cbarberis ENHANMENT: continue replacing deprecated Director::urlParams() b48504f
@cbarberis cbarberis ENHANCEMENT: Moved postblog (post in the front end) to BlogTree, so i…
…t works in BlogTree
@cbarberis cbarberis Reverted form to post entry to BlogHolder
ENHANCEMENT: added post as an allowed method on BlogTree
@phalkunz phalkunz BUGFIX: postgres and sql server compatibility 8de8414
@phalkunz phalkunz MINOR: update README a71f4e6
@phalkunz phalkunz MINOR: merge r106597 from branch 0.4 fe2e699
@phalkunz phalkunz MINOR: subsequent fix to commit r106598 755787d
@phalkunz phalkunz BUGFIX: resolve wrong character parsing when posting blog entry from …
…the front-end
@phalkunz phalkunz ENHANCEMENT: create a template function, BlogEntry::Content(), for co…
…nsistency of template writing and enable using text summary functionalities in template
@phalkunz phalkunz MINOR: add unit test for receiving trackback dc879cb
@phalkunz phalkunz FEATURE: Add send trackback notification 68df540
@phalkunz phalkunz ENHANCEMENT: Allow notifying multiple trackback urls per blog entry
APICHANGE: TrackBackDecorator::trackbackNotify() allow one parameter
APICHANGE: remove TrackBackDecorator::ShouldTrackbackNotify()
Will Rossiter BUGFIX: getParent() may return null. Prevent calling function on null…
… (esp when running tests)
Andreas Piening MINOR: fixed malformed sql query 3bf8ebc
@chillu chillu MINOR Fixed TrackbackURL->isDuplicate() with ANSI compliant SQL (see …
…r106984 and r107129)
@cbarberis cbarberis BUGFIX: Got rid of link to post new entry in the front end on a BlogT…
…ree (method does not exist on BlogTree).

Thanks smurkas (#4692)
@cbarberis cbarberis ENHANCEMENT: Added option to view archives just by year (ticket #5667)
ENHANCEMENT: added action on BlogTree
@cbarberis cbarberis BUGFIX: Fixed front end post entry form validation and its test d7bb8a6
@clarkepaul clarkepaul Blog styling 92c09ee
@chillu chillu BUGFIX Fixed XSS vulnerability in BlogTree when filtering by tags 3593f03
@cbarberis cbarberis BUGFIX: TagCloudWidget uses themedCSS instead css (ticket 6059, thank…
…s artyom)
@cbarberis cbarberis BUGFIX: TagCloudWidget sorts by frecuency even with limit equal 0, se…
…e ticket 6060
@phalkunz phalkunz MINOR: Allow decorating db and cms fields of widgets in one decorator…
…. Thanks to smurkas
@chillu chillu MINOR Added BlogEntry_Controller->PageComments() as a temporary worka…
…round to avoid deprecation warnings from new 'comments' module
@cbarberis cbarberis MINOR: Show in menus is true now by default c4dde4b
@cbarberis cbarberis MINOR: reverted show in menus true by default 40a52b8
phalkun MINOR: Move documentation from
MINOR: Update README to Markdown format
phalkunz MINOR: Blog tag now supports multibyte chars in the front-end. Thanks…
… to hex0id.
phalkunz MINOR: Make use of Link()'s parameter db45cb9
phalkunz MINOR: Fix RSS validator warning. Thanks to tim. 8ccd23d
@chillu chillu MINOR Migrated content from eef7d57
John Clarke BUGFIX: support for legacy installations for the date based blog entr…
…y listing using slashes rather than dashes. PATCH via jcinteractive. (#5)
@weberhofer weberhofer * Internationalized all messages
* added german translations
* to make dates internationalized, too, the
  setlocale(LC_TIME, Translatable::get_current_locale() . ".UTF8");
  should be set in the mysite/code/Page.php ContentController's init
SilverStripe Ltd. member

Hi there,

what happens if you don't set setlocale in Page_Controller::init()?


SilverStripe Ltd. member

This will be called when the file is first included, at which point the locale might not be set yet (depending on include order).
Damn statics... I'd suggest to overload Description(), Title() and CMSTitle() instead

static $title;
function Title() {
return self::$title ? self::$title : _t('ArchiveWidget.Title', 'Browse by Date');

This way we keep backwards compatible, but still allow translation on the instance - by the time the instance is created, the correct locale is set (as opposed to when the class is included). Keep in mind that you can't put evaluated PHP like self::$title into _t(), as the i18nTextCollector won't pick it up.


I have now changed the code as suggested by chillu; looks good.


@chillu can you peer review when you have amoment to see whether this from 2 years ago is still relevant?


The Widget module now has its own hooks for translating CMS visible fields, so it's not necessary to implement these in the PHP.

There are missing translation keys however. E.g. ArchiveWidget.TITLE, ArchiveWidget.CMSTITLE, ArchiveWidget.DESCRIPTION that need to be loaded into transifex. I'm not sure how one would go around requesting additional values to add to the index. :)


bump @tractorcow any idea what we should do with this PR? Time to close or can we pick anything from this useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Sorry, this diff is unavailable.

The repository may be missing relevant data. Please contact support for more information.

Something went wrong with that request. Please try again.