This patch to support the translation for the added buttons and indicator form this module, also i have changed the property currentStep inside FormStep class from protected to public as it doesn't make sense to define it as protected what if we need to access it from another form alter using the multistep_controller value inside the form alter.

i've spent 5 hours trying to override the indicators & buttons added from this module, but i guess you've code it in an "override proof", i guess you need to check the rebuildForm method maybe you need to use hide() instead of unset() as the passed form the the next form_alter hook won't have the full form object.

Thank You.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

waleedq created an issue. See original summary.

waleedq’s picture

StatusFileSize
new1.7 KB
sjpeters79’s picture

Looks good but t by itself is not enough. You need dependency inject it into the class and then use $this->t.

In order dependency inject it, you'll need to do the following:

use Drupal\Core\StringTranslation\StringTranslationTrait;

class ClassName {

use StringTranslationTrait;

public function someFunction() {
return $apple = $this->t('Fuji');
}

hmdnawaz’s picture

hmdnawaz’s picture

hmdnawaz’s picture

Status: Active » Needs review
hmdnawaz’s picture

Assigned: waleedq » Unassigned
hmdnawaz’s picture

aexchecker’s picture

@hmdnawaz, @waleedq
Thank you for your efforts.

FYI:

$this->t($variable);

This code is unappropriate to the Coding standards.
Only string literals should be passed to t() where possible.

So, we need to implement translations for configs.

aexchecker’s picture

Status: Needs review » Needs work
monymirza’s picture

Status: Needs work » Needs review
StatusFileSize
new2.18 KB

re-roll 1.X

monymirza’s picture

StatusFileSize
new2.39 KB

added DependencySerializationTrait.

andrei.vesterli made their first commit to this issue’s fork.

andrei.vesterli’s picture

Hello @monymirza

Your patch was merged into the repo. Thx for your support!

  • andrei.vesterli committed 999801c on 8.x-1.x
    Issue #2993571 by hmdnawaz, monymirza, andrei.vesterli, waleedq:...
andrei.vesterli’s picture

Status: Needs review » Fixed
andrei.vesterli’s picture

Status: Fixed » Closed (fixed)
k-mo’s picture

StatusFileSize
new2.24 KB

Patch failed for latest tag 2.0.2, updated.