Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Remove legacy sprintf style translations in favour of placeholders #1826

Conversation

robbieaverill
Copy link
Contributor

@robbieaverill robbieaverill commented May 19, 2017

Issue: silverstripe/silverstripe-framework#6582

Note: CMSBatchAction_* classes have still got %d placeholders in them, because they get passed around a bit before being replaced after the actual translation. I figured this isn't appropriate to replace at this point as it's logic change rather than sprintf -> named placeholder swapping.

@dhensby
Copy link
Contributor

dhensby commented Jul 27, 2017

big conflicts

@tractorcow
Copy link
Contributor

@robbieaverill can we rebase this and I'll merge it in.

@robbieaverill robbieaverill changed the base branch from master to 4 July 30, 2017 11:16
@robbieaverill robbieaverill changed the base branch from 4 to master July 30, 2017 11:17
@robbieaverill robbieaverill force-pushed the bugfix/remove-sprintf-in-translations branch from 521f405 to 92f995d Compare July 30, 2017 11:39
@robbieaverill
Copy link
Contributor Author

@tractorcow rebased, thanks =)

@tractorcow tractorcow merged commit 4a768e1 into silverstripe:master Jul 30, 2017
@robbieaverill robbieaverill deleted the bugfix/remove-sprintf-in-translations branch July 30, 2017 22:14
@@ -1742,7 +1742,7 @@ public function delete($data, $form)

$this->getResponse()->addHeader(
'X-Status',
rawurlencode(sprintf(_t('SilverStripe\\CMS\\Controllers\\CMSMain.REMOVEDPAGEFROMDRAFT', "Removed '%s' from the draft site"), $record->Title))
rawurlencode(sprintf(_t(__CLASS__ . '.REMOVEDPAGEFROMDRAFT', "Removed '{title}' from the draft site"), $record->Title))
Copy link
Contributor

Choose a reason for hiding this comment

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

Darn, I just realised we need to remove these sprintf calls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #1915

@tractorcow
Copy link
Contributor

I've manually cherry picked this to 4 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants