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

[Translations] inline translation not working #4397

Closed
rallek opened this issue Jul 11, 2020 · 9 comments
Closed

[Translations] inline translation not working #4397

rallek opened this issue Jul 11, 2020 · 9 comments

Comments

@rallek
Copy link
Contributor

rallek commented Jul 11, 2020

Q A
Zikula Version 3.0.0
PHP Version 7.4.5

Expected Behavior

inline translation shall be available when dev mode is enabled and inline editing is enabled too

Current Behavior

web console is showing a lot of errors. Always the same message:

Uncaught TypeError: Illegal constructor.
    <anonymous> http://3.k62.org/bundles/translation/js/editInPlace.js:11
    <anonymous> http://3.k62.org/bundles/translation/js/editInPlace.js:19

Steps to Reproduce

  1. switch on dev mode
  2. go to php_translation.yaml and change the config_name for your module you want to work on e.g.
    # edit translations directly in the context of a page
    edit_in_place:
        # https://php-translation.readthedocs.io/en/latest/symfony/edit-in-place.html
        enabled: true
        #config_name: app
        config_name: munewsmodule
        #config_name: zikula # the configuration to use
        activator: 'Translation\Bundle\EditInPlace\Activator'
        show_untranslatable: true # show untranslatable messages with a corresponding icon
  1. activate inline editing in main setting
  2. go to NewsModule and try to translate. -> no icons are showing up to translate but a lot of errors in the web console
@rallek rallek added the Bug label Jul 11, 2020
@rallek
Copy link
Contributor Author

rallek commented Jul 11, 2020

I translated via Symphony some words and saved them. The config above is ignored. All results are stored in the folder of Zikula:
zikula\translations
They are stored as yaml but my translations are po.

@rallek
Copy link
Contributor Author

rallek commented Jul 11, 2020

I tried also to change this settings but it is still storing all at the Zikula translation place and not inside the module:

    # automatically add missing translations
    auto_add_missing_translations:
        # https://php-translation.readthedocs.io/en/latest/symfony/auto-add-missing.html
        enabled: false
        #config_name: zikula # the configuration to use
        config_name: munewsmodule

@rallek
Copy link
Contributor Author

rallek commented Jul 12, 2020

One more observation:
If I translate something via Symphony Profiler the change is stored in both, po and yaml. Unfortunately not inside the modules translation folder

@Guite Guite added this to the 3.0.2 milestone Jul 12, 2020
@rallek
Copy link
Contributor Author

rallek commented Jul 14, 2020

one more addition: If I translate my MUNewsModule po files via translation-ui the translation is stored correctly inside the po files of the news module and not added to the core translation! Exactly as I expected.

@rallek
Copy link
Contributor Author

rallek commented Jul 14, 2020

next observation:
in zikula/config/routes/dev/php_translation.yaml I find this settings:

_translation_edit_in_place:
    resource: '@TranslationBundle/Resources/config/routing_edit_in_place.yaml'
    prefix:  /admin

_translation_webui:
    resource: "@TranslationBundle/Resources/config/routing_webui.yaml"
    prefix:  /admin

_translation_profiler:
    resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yaml'

But I can not find one of these three configuration yaml. I was looking inside PagesModule and NewsModule. But there is no file like routing_edit_in_place.yaml. Where can I find these configurations?

@Guite
Copy link
Member

Guite commented Jul 14, 2020

routes are not related to translations

@rallek
Copy link
Contributor Author

rallek commented Jul 14, 2020

okay. I opend all files I found with translation inside the file name :-)
And now I found that file inside the vendor folder

@Guite Guite changed the title inline translation not working [Translations] inline translation not working Jul 15, 2020
@Guite Guite modified the milestones: 3.0.2, 3.0.3 Aug 28, 2020
@craigh
Copy link
Member

craigh commented Aug 28, 2020

see related comment

@Guite Guite modified the milestones: 3.0.3, 3.0.4 Sep 4, 2020
@Guite Guite modified the milestones: 3.0.4, 3.2.0 Mar 17, 2021
@Guite Guite modified the milestones: 3.2.0, 4.0.0 Dec 30, 2021
@Guite
Copy link
Member

Guite commented Apr 2, 2023

Closing as this feature will not make it into 4.0

@Guite Guite closed this as completed Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants