Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] Deprecate support for legacy directories in Translation comands#28892

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@chalasr
Copy link
Member

@chalasrchalasr commentedOct 16, 2018
edited
Loading

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRtodo

ro0NL reacted with hooray emoji
$this->fs =newFilesystem();
$this->translationDir =sys_get_temp_dir().'/'.uniqid('sf_translation',true);
$this->fs->mkdir($this->translationDir.'/Resources/translations');
$this->fs->mkdir($this->translationDir.'/Resources/views');
Copy link
Member

Choose a reason for hiding this comment

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

We can remove this too, I guess.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yea, this PR needs work, will finish tomorrow :)

}
$transPaths[] =sprintf('%s/Resources/%s/translations',$kernel->getRootDir(),$bundle->getName());
$transPaths[] =$deprecatedPath =sprintf('%s/Resources/%s/translations',$kernel->getRootDir(),$bundle->getName());
if ($deprecatedPath !==$this->defaultTransPath.'/'.$bundle->getName() &&is_dir($deprecatedPath)) {
Copy link
Member

Choose a reason for hiding this comment

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

The overriding path for bundles shouldn't match$this->defaultTransPath.'/'.$bundle->getName() never, right?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

indeed, check removed

@nicolas-grekasnicolas-grekas modified the milestones:next,4.2Oct 20, 2018
@fabpot
Copy link
Member

@chalasr Will you have time to finish this PR? I'd like to wrap up 4.2 and this one is needed before the first beta. Thank you.

@chalasrchalasrforce-pushed thedeprecate-old-translation-dirs branch 5 times, most recently froma2b95dc to342c4a0CompareOctober 26, 2018 19:18
@chalasrchalasr changed the title[FrameworkBundle] Deprecate old paths in translation commands[FrameworkBundle] Deprecate support for legacy translation and views directoriesOct 26, 2018
@chalasrchalasrforce-pushed thedeprecate-old-translation-dirs branch from342c4a0 to78026caCompareOctober 26, 2018 19:24
@chalasrchalasrforce-pushed thedeprecate-old-translation-dirs branch 9 times, most recently from037ea64 toc4ed34aCompareOctober 26, 2018 21:14
@chalasr
Copy link
MemberAuthor

@fabpot thanks for the ping, PR ready.

@chalasrchalasr changed the title[FrameworkBundle] Deprecate support for legacy translation and views directories[FrameworkBundle] Deprecate support for legacy directories in Translation comandsOct 26, 2018
@chalasrchalasrforce-pushed thedeprecate-old-translation-dirs branch 2 times, most recently fromf7913b8 to36ee73eCompareOctober 26, 2018 23:42
$transPaths =array();
if (is_dir($dir =$rootDir.'/Resources/translations')) {
if ($dir !==$this->defaultTransPath) {
$notice =sprintf('Storing translations in the "%s" directory is deprecated since Symfony 4.2.',$dir);
Copy link
Member

Choose a reason for hiding this comment

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

we are using single sentences for deprecation message:Storing ... since Symfony 4.2, use the ...

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

fixed

@chalasrchalasrforce-pushed thedeprecate-old-translation-dirs branch from36ee73e to5521f22CompareOctober 27, 2018 10:35
@chalasrchalasrforce-pushed thedeprecate-old-translation-dirs branch 2 times, most recently froma45a9fc toafe797eCompareOctober 27, 2018 12:36
if (is_dir($dir =sprintf('%s/Resources/%s/translations',$rootDir,$bundle->getName()))) {
$transPaths[] =$dir;
$notice =sprintf('Storing translations files for "%s" in the "%s" directory is deprecated since Symfony 4.2,',$dir,$bundle->getName());
@trigger_error($notice.($this->defaultTransPath ?sprintf('use the "%s" directory instead.',$this->defaultTransPath.'/bundles/'.$bundle->getName()) :sprintf('configure "translator.default_path" and create a "bundles/%s/" directory into it instead.',$bundle->getName())),E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe same here and mention just$this->defaultTransPath?

$transPaths[] =$bundle->getPath().'/Resources/translations';
if ($this->defaultTransPath) {
$transPaths[] =$this->defaultTransPath.'/'.$bundle->getName();
}
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@chalasrchalasrforce-pushed thedeprecate-old-translation-dirs branch fromafe797e toa7a8aadCompareOctober 27, 2018 14:37
@fabpot
Copy link
Member

Thank you@chalasr.

@fabpotfabpot merged commita7a8aad intosymfony:masterOct 27, 2018
fabpot added a commit that referenced this pull requestOct 27, 2018
…ries in Translation comands (chalasr)This PR was merged into the 4.2-dev branch.Discussion----------[FrameworkBundle] Deprecate support for legacy directories in Translation comands| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | todoCommits-------a7a8aad [FrameworkBundle] Deprecate support for legacy translations and views directories
@chalasrchalasr deleted the deprecate-old-translation-dirs branchOctober 27, 2018 16:06
This was referencedNov 3, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@ycerutoycerutoyceruto left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

6 participants

@chalasr@fabpot@stof@yceruto@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp