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

Searching for translations with English pack disabled #24

Open
csBlackWolf opened this issue Nov 18, 2020 · 3 comments
Open

Searching for translations with English pack disabled #24

csBlackWolf opened this issue Nov 18, 2020 · 3 comments

Comments

@csBlackWolf
Copy link

Hello.

I try to make a German Forum with FreeFlarum what has the FoF-Terms extension preinstalled.
So i added my ToS for the registration and now i wanted to translate the Text "I accept the Terms of Service" to German.
I can translate "Terms of Service", but the text before it can't be translated.
I tried to find and change the line with the extension "linguist" but can't find this text line there.

It would be really nice to add a option to translate it without modifying the code, what is not possible if i using FreeFlarum.

With best regards

csBlackWolf

grafik

@clarkwinkelmann
Copy link
Member

clarkwinkelmann commented Nov 18, 2020

Hello. I'm not sure I understand which translation you have issues with. There's one named fof-terms.forum.accept-modal.i-accept and another named fof-terms.forum.signup.i-accept which both contain almost identical text.

image

The screenshot is on beta 14 but I don't expect any difference in older versions.

You need to preserve <a>{policy}</a> as it is so it can be substituted with the policy name. If you have a single policy and wanted its name to change between languages, you could hard-code it in that translation in place of {policy}.

If you're not seeing the same results as me in the translation search, can you share the version of Linguist and Terms that are installed on that forum? I suppose you can't share php flarum info if that's FreeFlarum but you should see the extension version(s) in the Extensions tab.

@csBlackWolf
Copy link
Author

csBlackWolf commented Nov 19, 2020

Hmmm... For me it is not showing, if i type 'i accept' in the search from linguist. 😐
grafik

Edit: Ok. I have found the issue. I need to have the English language extension enabled, to find this line in linguist. 😅
grafik
grafik

@clarkwinkelmann
Copy link
Member

Yes linguist is only able to list strings that originally exist in at least one of the enabled languages, so this usually requires having the English pack enabled. You can disable the English Pack once you're done translating.

We might be able to show/search English strings for extensions even when English is disabled now that I think of it. Those translations are registered by extensions regardless of the enabled language so we could pull them out.

@clarkwinkelmann clarkwinkelmann changed the title Translation option for text lines Searching for translations with English pack disabled Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants