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

[GUI] Generate FAQ answer content programmatically #2260

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

Fuzzbawls
Copy link
Collaborator

Each FAQ answer content is formatted as a self-contained HTML page for
styling purposes, however, having raw HTML in the .ui file's
<string> properties means that said HTML tags are also exported to
Transifex. This leads to a very ugly and confusing translation
experience that is prone to errors.

Here, we split up the content into shorter HTML-less strings: each list
item is it's own string, and each paragraph is it's own string. No HTML
tags are exported to Transifex.

The necessary HTML tags are added by way of helper functions that wrap
each string programmatically.


Avoids strings such as this one from being passed to Transifex, where spacing, line breaks, and ambiguous numbered "tags" must be carried over to the translated string precisely in order for the translated string to be considered "valid":
ScreenShot_20210322160421

@Fuzzbawls Fuzzbawls added this to the Future milestone Mar 23, 2021
@Fuzzbawls Fuzzbawls self-assigned this Mar 23, 2021
@random-zebra random-zebra modified the milestones: Future, 6.0.0 Mar 25, 2021
random-zebra
random-zebra previously approved these changes Mar 27, 2021
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 50cb2f8

@random-zebra random-zebra requested a review from furszy April 4, 2021 07:41
furszy
furszy previously approved these changes Apr 12, 2021
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK 50cb2f8, looking good with two minor nits.

src/qt/pivx/settings/settingsfaqwidget.h Outdated Show resolved Hide resolved
src/qt/pivx/settings/settingsfaqwidget.h Outdated Show resolved Hide resolved
Each FAQ answer content is formatted as a self-contained HTML page for
styling purposes, however, having raw HTML in the `.ui` file's
`<string>` properties means that said HTML tags are also exported to
Transifex. This leads to a very ugly and confusing translation
experience that is prone to errors.

Here, we split up the content into shorter HTML-less strings: each list
item is it's own string, and each paragraph is it's own string. No HTML
tags are exported to Transifex.

The necessary HTML tags are added by way of helper functions that wrap
each string programmatically.
@Fuzzbawls Fuzzbawls dismissed stale reviews from furszy and random-zebra via ea7f593 April 13, 2021 08:28
@Fuzzbawls Fuzzbawls force-pushed the 2021_gui-faq-strings-refactor branch from 50cb2f8 to ea7f593 Compare April 13, 2021 08:28
@Fuzzbawls
Copy link
Collaborator Author

cleaned up the whitespace

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK ea7f593

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK ea7f593 and merging..

@furszy furszy merged commit 64920e8 into PIVX-Project:master Apr 13, 2021
furszy referenced this pull request in furszy/bitcoin-core Jun 18, 2021
Each FAQ answer content is formatted as a self-contained HTML page for
styling purposes, however, having raw HTML in the `.ui` file's
`<string>` properties means that said HTML tags are also exported to
Transifex. This leads to a very ugly and confusing translation
experience that is prone to errors.

Here, we split up the content into shorter HTML-less strings: each list
item is it's own string, and each paragraph is it's own string. No HTML
tags are exported to Transifex.

The necessary HTML tags are added by way of helper functions that wrap
each string programmatically.

Github-Pull: bitcoin#2260
Rebased-From: ea7f593
@random-zebra random-zebra modified the milestones: 6.0.0, 5.2.0 Jun 18, 2021
furszy added a commit that referenced this pull request Jun 19, 2021
3344fb3 [CI] Remove Ubuntu 16.04 from GA workflow, has been deprecated by GA and will be removed on September 20, 2021. (furszy)
b5a8638 [GUI] Cleanup compiler warnings in qtutils.h/cpp (furszy)
73b56e9 [GUI] Fix invisible text due an invalid transparent selection color. (furszy)
df5d820 budget: fixing a possible race condition that could cause a good peer being banned. (furszy)
a5fd073 Fix minimize and close bugs (furszy)
b516e36 depends: update Qt 5.9 source url (Kittywhiskers Van Gogh)
18f4b4a BugFix: fix not updating GUI balance race condition. (furszy)
2c923ed scripted-diff: Replace 'NULL' with 'nullptr' in guiutil.cpp (random-zebra)
7b8b23a Fix memory leaks in qt/guiutil.cpp (Dan Raviv)
cbd5c78 Add search option to My Addresses list in receive widget (Volodia)
0dcbea2 [build] depends macOS: point --sysroot to SDK (Sjors Provoost)
3b542fc [Doc] remove old gitian keys. (furszy)
0f099e8 [GUI] Generate FAQ answer content programmatically (Fuzzbawls)
8483861 qt:Show the entire Window when double clicking on taskbar (ken2812221)
998c7e8 [GUI] fix QT 5.15 `currentIndexChanged(QString)` deprecated method call. (furszy)

Pull request description:

  List of straightforward PRs back ported from v6.0 into the v5.2 branch (ordered by merge date).

  * #2259.
  * #2260.
  * #2348
  * #2350
  * #2353
  * #2305
  * #2374
  * #2379
  * #2384
  * #2377
  * #2395
  * #2401
  * #2413

ACKs for top commit:
  random-zebra:
    utACK 3344fb3
  Fuzzbawls:
    utACK 3344fb3

Tree-SHA512: 4317e83d4c1228b8ae20dc1bc5c8e43ac87598d4d9d9244fdd032f2a0c5eccd1a7ed27bc29094c7411dd653b187c728ab31d732ea686abda15228920a390e4e1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants