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.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 2993571-multilingual_support-2.patch | 2.24 KB | k-mo |
| #4 | translation_support_for_buttons_and_indicators-2993571-4.patch | 2.16 KB | hmdnawaz |
| #2 | 2993571-multilanguage-support.patch | 1.7 KB | waleedq |
Issue fork simple_multistep-2993571
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
Comment #2
waleedq commentedComment #3
sjpeters79 commentedLooks 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');
}
Comment #4
hmdnawaz commentedComment #5
hmdnawaz commentedComment #6
hmdnawaz commentedComment #7
hmdnawaz commentedComment #8
hmdnawaz commentedComment #9
aexchecker commented@hmdnawaz, @waleedq
Thank you for your efforts.
FYI:
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.
Comment #10
aexchecker commentedComment #11
monymirzare-roll 1.X
Comment #12
monymirzaadded DependencySerializationTrait.
Comment #15
andrei.vesterliHello @monymirza
Your patch was merged into the repo. Thx for your support!
Comment #17
andrei.vesterliComment #18
andrei.vesterliComment #19
k-mo commentedPatch failed for latest tag 2.0.2, updated.