Skip to content

Loading…

Internationalized all messages #6

Closed
wants to merge 248 commits into from
@weberhofer
  • 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
fc03f9f
@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
0f1b7ab
@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
104301e
Will Rossiter d10e859
@halkyon halkyon Added newsletter sign up and confirm functionality (as required) and …
…templates
acb5d1a
@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
5668169
@halkyon halkyon Moved NewsletterSignupForm to the object, made a link to this from th…
…e blogentry page
3117340
@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
d1c6825
@halkyon halkyon Added ConfirmNewsletterSignup_member.ss as an example how to customis…
…e, added themedCSS requirements to controller
d971db3
@halkyon halkyon Abstracted fields onto BlogRole from subscribe form, added some docum…
…entation about what it does
fe23b0c
@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
8097488
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
svn://svn.silverstripe.com/silverstripe/modules/blog/branches/trunk-dnc
b039275
@chillu chillu Merged revisions 56170 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/blog/branches/trunk-dnc

........
  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)
........
4df0def
@chillu chillu Initialized merge tracking via "svnmerge" with revisions "1-56177" from
svn://svn.silverstripe.com/silverstripe/modules/blog/branches/trunk-caron
6e052e0
@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
........
f668f5b
@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
0f0e473
@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.
3594462
@sminnee sminnee d66b6e3
@sminnee sminnee Only call LeftAndMain::require_javascript() if that method exists - a…
…llows blog module compatibility with 2.2.2
9c004b4
@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
6256c6d
@halkyon halkyon 2b64a33
@halkyon halkyon BUGFIX Renamed Tags in TagCloudWidget->Tags() to TagsCollection() whi…
…ch is less confusing and now renders the tags correctly
ccd3bc1
@halkyon halkyon MINOR whitespace 54f0af8
@halkyon halkyon MINOR invalid use of single quotes as HTML
MINOR whitespace in PHP cleanup
237dd45
@halkyon halkyon MINOR whitespace cleanup a154851
@halkyon halkyon MINOR More whitespace cleanup 9d959c6
@halkyon halkyon MINOR fixed template messup in BlogHolder_post.ss 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
fffc4d6
@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().
f9aa8d9
@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
e6c0d70
@chillu chillu MINOR Added or updated README information (mostly with maintainer con…
…tact)
7143e27
@chillu chillu MINOR Updated language master table c17a1ff
@chillu chillu MINOR Updated entities from translate.silverstripe.com 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
16736e2
@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.
d8cb2ae
@chillu chillu MINOR Updated master language tables 095d410
@halkyon halkyon BUGFIX Fixed possible Member::currentUser() problem with inconsistent…
… function names
c3c9720
@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
cbf39d1
@halkyon halkyon ENHANCEMENT Added empty statics to BlogHolder to allow for decoration…
… of BlogHolder
bccb236
@halkyon halkyon BUGFIX If WYSIWYG editing enabled, don't attempt to parse the content…
…, just return the HTML instead

MINOR HTML code formatting in BlogEntry.ss
d2969a7
@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
8e74406
@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
1124335
@chillu chillu BUGFIX Adjusted blog pagination to new PaginationSummary syntax (see …
…r67984)
733cce2
@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()
01b48e7
@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
dcb23d6
@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
4b6a22f
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
a41cf18
@rixth rixth 7fe8c11
@phalkunz phalkunz BUGFIX: prevet calling loadDescendantBlogHolderIDListInto() on BlogPa…
…ge and its subclass
1a2e2a1
@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
2662268
@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
c920045
@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
fea6a12
@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
a2b9e2f
@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
1d2c96b
@ajoneil ajoneil BUGFIX: Remove test that is no longer needed b280224
@phalkunz phalkunz MINOR: renames BlogHolder.ss to BlogTree.ss so that blog tree will ha…
…ve a template while the template still applies to blog holder
05bc46a
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…
…upDateTimeField
e45daff
@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
3864a78
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.
b066dce
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
d9d12dd
@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)
606d526
@cbarberis cbarberis ENHANCEMENT: replaced deprecated Director::urlParams()
BUGFIX: tag working with nested urls
5a5cdf1
@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
b389d86
@cbarberis cbarberis Reverted form to post entry to BlogHolder
ENHANCEMENT: added post as an allowed method on BlogTree
1e96d25
@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
1f706f6
@phalkunz phalkunz ENHANCEMENT: create a template function, BlogEntry::Content(), for co…
…nsistency of template writing and enable using text summary functionalities in template
8b4b0f9
@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()
834b6d8
Will Rossiter BUGFIX: getParent() may return null. Prevent calling function on null…
… (esp when running tests)
20ad8df
Andreas Piening MINOR: fixed malformed sql query 3bf8ebc
@chillu chillu MINOR Fixed TrackbackURL->isDuplicate() with ANSI compliant SQL (see …
…r106984 and r107129)
d75c402
@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)
9cfd303
@cbarberis cbarberis ENHANCEMENT: Added option to view archives just by year (ticket #5667)
ENHANCEMENT: added action on BlogTree
d491c44
@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)
1a6bb14
@cbarberis cbarberis BUGFIX: TagCloudWidget sorts by frecuency even with limit equal 0, se…
…e ticket 6060
438feba
@phalkunz phalkunz MINOR: Allow decorating db and cms fields of widgets in one decorator…
…. Thanks to smurkas
eb52713
@chillu chillu MINOR Added BlogEntry_Controller->PageComments() as a temporary worka…
…round to avoid deprecation warnings from new 'comments' module
66f7263
@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 http://doc.silverstripe.org
MINOR: Update README to Markdown format
c3415b6
phalkunz MINOR: Blog tag now supports multibyte chars in the front-end. Thanks…
… to hex0id.
e2f088e
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 doc.ss.org 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)
1ed87c0
@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
  function
6190f66
@cbarberis
SilverStripe Ltd. member

Hi there,

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

cheers
Carlos

@weberhofer
@chillu
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.

@weberhofer

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

@camfindlay

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

@tractorcow

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. :)

@camfindlay

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.