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

Placeholders for rendered size check [$50 awarded] #3140

Closed
IlDucci opened this issue Oct 23, 2019 · 9 comments
Closed

Placeholders for rendered size check [$50 awarded] #3140

IlDucci opened this issue Oct 23, 2019 · 9 comments
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@IlDucci
Copy link

IlDucci commented Oct 23, 2019

Good evening. I would like to request certain upgrades and additions to the string length rendering checks:

Is your feature request related to a problem? Please describe.
I find two problems when it comes to check the renderings:

  • I'm using the tool to translate the dialogues of a game. Imagine you're using control codes within your dialogues. Just as they can be marked for references, can certain string combos/control codes be marked to have specific widths, from zero (In the case of, for example, color control codes) to a fixed width (For example, variables that draw names).
  • Call me micromanager, but sometimes I'd like to see the actual sample of the rendered dialogue. Maybe I have a word that's too long and that's going over the limit because of that reason, but I won't be able to know it's the problem unless I actually see the rendered sample. Or maybe I'd like to do the line breaks manually to improve the text flow. Is there a way to display the sample renders to the user?

Describe the solution you'd like

  • Add support for a table of custom lengths for specific control codes or words/partial words. Those lengths could be zero, a specific value, or a value measured in characters, perhaps (For example, I could use a sample name/temp name as a way to calculate the widths).
  • Display the font rendering samples as graphics during the translation/revision process.

Describe alternatives you've considered

  • About lengths, there's the chance that the same project has more than one string length values. Maybe the values could be targeted per component or maybe there could be a single, "default" value and then specific values for the minority components that have different string length parameters.
  • About the font rendering, probably the best way to avoid a server overload is to make the graphic display on-demand, by the touch of a button, for example. Having a lot of images rendered and displayed could cause havoc in Zen mode. But if the actual TTF can be used as a web font, maybe the system could use it to display on-the-fly modifications, which could even work in Zen mode.

Additional context
There's not much else I can think of right now.

@nijel
Copy link
Member

nijel commented Oct 23, 2019

Can you please keep it one feature per issue? I've separated #3143

@nijel nijel changed the title Enhance and expand the usage of string length checks and font rendering Control codes for rendered size check Oct 23, 2019
@nijel nijel added the enhancement Adding or requesting a new feature. label Oct 23, 2019
@IlDucci
Copy link
Author

IlDucci commented Oct 23, 2019

Sorry about that.

@nijel
Copy link
Member

nijel commented Oct 23, 2019

Can you please clarify how the control codes look like? To me it looks like string replacement would be better fit for this than manually specifying width. That way it will also look better with #3143.

@IlDucci
Copy link
Author

IlDucci commented Oct 23, 2019

Right now we have a few, so let me write some similar examples (I'm a translator, so I cannot speak about the naming decisions here)...

<COLOR_RED> as an example for coloring, <PORTRAIT_(character-name)_(number)> for displaying portraits and <PROTAGONIST_FULL_NAME> for displaying a name and a surname. The first and second cases should count as zero, and the third one, well... I personally was thinking of adding the equal value to the max amount of chars available in memory (For example, 8 chars for the name + the space of the space character + 8 chars for the surname).

@nijel nijel changed the title Control codes for rendered size check Placeholders for rendered size check Oct 25, 2019
@nijel nijel changed the title Placeholders for rendered size check Placeholders for rendered size check [$25] Dec 12, 2019
@nijel nijel added the bounty label Dec 12, 2019
@nijel
Copy link
Member

nijel commented Mar 4, 2020

Effectively, #3546 is prerequisite here to support space and other special chars in the strings.

@nijel nijel changed the title Placeholders for rendered size check [$25] Placeholders for rendered size check [$50] Jun 4, 2020
@nijel nijel added this to the 4.1 milestone Jun 5, 2020
@nijel nijel self-assigned this Jun 5, 2020
@nijel nijel closed this as completed in d4b1d34 Jun 5, 2020
@github-actions
Copy link

github-actions bot commented Jun 5, 2020

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

nijel added a commit that referenced this issue Jun 5, 2020
Docs was missing and the cache key method was duplicated.

Issue #3140
@nijel nijel changed the title Placeholders for rendered size check [$50] Placeholders for rendered size check [$50 awarded] Jun 11, 2020
@IlDucci
Copy link
Author

IlDucci commented Jul 6, 2020

I've found an error: it is not possible to add more than one empty entries in the replacements string.

#, replacements:{COLOR-GREY}:""

Makes any elements called {COLOR-GREY} dissappear. This is a behavior I would like to keep.

Writing this:
#, replacements:{COLOR-GREY}:"":{COLOR-GARNET}:"":{VARIABLE-01}:99

Causes a server error when pulling the new changes, and the server considers it is up-to-date.

@nijel
Copy link
Member

nijel commented Jul 6, 2020

Can you please open separate issue for that? Preferably including the traceback. Most likely it's a bug in the parser introduced by #3546

nijel added a commit that referenced this issue Jul 6, 2020
Still, this doesn't seem to trigger the error described in #3140.
@IlDucci
Copy link
Author

IlDucci commented Jul 6, 2020

Can you please open separate issue for that? Preferably including the traceback. Most likely it's a bug in the parser introduced by #3546

Done. Check #4136.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants