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

Running i18n-ize templates script translates css classes #3075

Closed
MCGallaspy opened this issue Feb 20, 2015 · 11 comments · Fixed by fle-internal/i18nize_templates#3
Closed
Assignees
Milestone

Comments

@MCGallaspy
Copy link
Contributor

Some css classes are defined in template blocks used, for example, to highlight an active tab. The i18n-ize script wraps these in translate tags. See here for an example. Can we add some blocks (like {% block users_active %}) to a blacklist for the purposes of this script?

@jamalex
Copy link
Member

jamalex commented Feb 22, 2015

Oooh, yeah, that will break things badly when using another language. Good catch!

Rather than making a blacklist in some third location, perhaps we could have a template tag or other marker right on a piece of text that should be ignored by i18n-ize.

Also, @aronasorman @cpauya, this seems like yet another good reason to have a dummy language pack containing reversed/accented strings, as that would allow us to catch things like this more easily. Could someone build such a language pack and share it for testing?

@jamalex jamalex added this to the 0.13.x milestone Feb 22, 2015
@jamalex jamalex assigned cpauya and unassigned aronasorman Feb 22, 2015
@jamalex
Copy link
Member

jamalex commented Feb 22, 2015

Adding this to the 0.13.x milestone, since it will break nav for i18n users. MVP is just to manually remove the existing bad translate tags.

@cpauya cpauya added the ready label Feb 23, 2015
@cpauya cpauya assigned arceduardvincent and unassigned cpauya Feb 23, 2015
@cpauya cpauya added in progress and removed ready labels Feb 23, 2015
@arceduardvincent
Copy link
Contributor

Hi @aronasorman and @cpauya

I would like to work on this issue.

Objective:

1 Include this blocks {% block users_active %} to the blacklist of i18n-ize templates script.
2 Create a dummy language pack
3 Replicate the dummy language translation to our i18n-ize string.

Question:

Could we make the make a dummy language pack another filed issue?
Coz I think this one is not part of fixing the i18n-ize templates script

@cpauya
Copy link
Contributor

cpauya commented Feb 23, 2015

Good idea, please file another issue to make a dummy language pack for testing.

@arceduardvincent
Copy link
Contributor

Yeah, I will thanks .
I will file the dummy language pack issue to the central server. Since our central server concern about the language pack that will be downloaded by the distributed.

@arceduardvincent
Copy link
Contributor

Hi @MCGallaspy .

I will make a file that contains about the list blocks that we may set its value to be ignored or be run i18n-ize templates script.

Blacklisting Format

('startag', 'endtag', True/False)
('{% block users_active %}', '{% endblock users_active %}', True)

Examples :

{% block users_active %}active{% endblock users_active %}
{% block manage_active %}active{% endblock manage_active %}
{% block facility_active %}facility-active active-tab active-nav{% endblock facility_active %}

Note:
There are some blocks that i18n-ize templates script must run on them like {% block content %} .

If you had some good idea please tell me so I could know so we could improve the script better.
Thanks

@MCGallaspy
Copy link
Contributor Author

@arceduardvincent, I think @jamalex has a better idea:

Rather than making a blacklist in some third location, perhaps we could have a template tag or other marker right on a piece of text that should be ignored by i18n-ize.

That way it would be immediately clear to the reader what is getting picked up by the i18n-ize script and what isn't. What do you think?

@arceduardvincent
Copy link
Contributor

@MCGallaspy yeah it is good idea that we place a marker since minority of the blocks are must be ignored by our i18n-ize templates script.

@cpauya cpauya added ready and removed in progress labels Feb 25, 2015
@MCGallaspy
Copy link
Contributor Author

@arceduardvincent how's this coming along?

@arceduardvincent
Copy link
Contributor

Hello @MCGallaspy sorry that I reply late and didn't comply this issue last week,
I am working on some frontend issues that I think that will affect a lot on the user or client experience that I prioritise .

Today I work on this thanks.

@arceduardvincent
Copy link
Contributor

I think we can close this issue since that the fixes are being merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants