Page MenuHomeWildfire Games

Hide useless lobby password label and add translation context
ClosedPublic

Authored by vladislavbelov on Aug 5 2017, 6:31 PM.

Details

Reviewers
elexis
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Owners Package(Owns No Changed Paths)
Commits
rP20013: Use different translation contexts for the "enter your password" string.
Summary

Currently if press Multiplayer Game and go to change login, you'll see a label like Please enter you password, but you have only two buttons: Register and Connect. This message doesn't appear usually because you have the filled password field.

The second problem, that there used the same text for new password and for enter password, i.e. in Russian language it has different translates, so I added contexts.

Test Plan
  1. Run the game
  2. Try to login/register with the empty password field
  3. Check messages

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vladislavbelov created this revision.Aug 5 2017, 6:31 PM
vladislavbelov edited the summary of this revision. (Show Details)
vladislavbelov retitled this revision from Hide useless coment before time and add contexts to Hide useless label before time and add contexts.Aug 5 2017, 6:33 PM
Vulcan added a subscriber: Vulcan.Aug 5 2017, 7:18 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1802/ for more details.

vladislavbelov added inline comments.Aug 6 2017, 12:47 AM
binaries/data/mods/public/gui/lobby/prelobby.js
109 ↗(On Diff #3015)

For the registration password we could add something like: Please enter the wished password.

elexis added a subscriber: elexis.

Oh wait, this is the same issue as described in D788? If so, upload only the context change here.

elexis edited edge metadata.Aug 18 2017, 4:45 PM

Well this prelobby page is still terrible.

  • The logic to handle the connect and register page should be split more obviously.
  • This way we don't need that pageRegisterHidden variable, neither a new one.
  • The common password-check code should be moved to a helper function.
  • OnTick should only do the while loop and Engine.LobbyGuiPollMessage() fetching, but do the parsing in some other function. This had been done already in https://code.wildfiregames.com/rP17581#b6508792 but it was reverted in rP17584 for no reason while adding some orthogonal feature. In particular we still have the exact same style in lobby.js, so IMO the revert of the revert should be reverted while fixing all other issues as well.

In the light of that plan, it doesn't really matter which of the two fixes we commit.

binaries/data/mods/public/gui/lobby/prelobby.js
109 ↗(On Diff #3015)

The english string can be kept as is IMO

elexis retitled this revision from Hide useless label before time and add contexts to Hide useless lobby password label and add translation context.Aug 19 2017, 11:20 AM
elexis accepted this revision.Aug 21 2017, 3:58 AM
elexis added inline comments.
binaries/data/mods/public/gui/lobby/prelobby.js
72 ↗(On Diff #3015)

The patch in D788 doesn't need the new variable and until that onTick is rewritten beyoned recognizability, we'll better keep it that else-if-elseif-elseif-elseif-elseif-elseif-elseif-elseif-elseif-elseif-elseif-else chain.

107 ↗(On Diff #3015)

better "login" that "connect".
Using ternary now that we don't need to fix a bug in the same go.

This revision is now accepted and ready to land.Aug 21 2017, 3:58 AM
This revision was automatically updated to reflect the committed changes.