Skip to content

Rebased revise ensure sys event names not translated#934

Merged
SlySven merged 6 commits intoMudlet:developmentfrom
SlySven:Rebased_revise_ensureSysEventNamesNotTranslated
Apr 29, 2017
Merged

Rebased revise ensure sys event names not translated#934
SlySven merged 6 commits intoMudlet:developmentfrom
SlySven:Rebased_revise_ensureSysEventNamesNotTranslated

Conversation

@SlySven
Copy link
Copy Markdown
Member

@SlySven SlySven commented Apr 20, 2017

These three commits are the cleaned up series of PR #911 organised as was wanted. For the full gory details I have to refer you to that PR which I am about to close in favour of this one; apart from some spaces {and possibly some return lua_error(L);s now used to quieten a coverity(?) warning} the net effect should be the same.

I won't ask @vadi2 to review it again - but I'll mention you to keep you in the loop. 😄

SlySven added 3 commits April 19, 2017 22:40
Ensure all system generated events have event names that are NOT subjected
to translation.  However as I have recently learned that QLatin1String is
a better choice in most circumstances as opposed to QStringLiteral I have
changed to use them instead.

As it is concerned with using QLatin1String wrappers around things
involving TEvent instances I have extended the re-coding to the qDebug()
code provided in TEvent.h to produce a formatted and useful dump of a
TEvent instance should it be passed to the Qt Debug system methods.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Rename some TEvent instances where our convention on naming suggested the
data structure reference was a pointed to a TEvent rather than the TEvent
itself (i.e. use of pE - at some stage in the past we were using pointers!)

In the light of revisions to our code style choices - I also adopt those in
the areas I have modified.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
We recently added nil and boolean type argument support to the TEvent
infrastructure however it was missed from being added to labels.  This will
do that and also bring the coding styles recently decided upon to those Lua
functions.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Copy link
Copy Markdown
Contributor

@ahmedcharles ahmedcharles left a comment

Choose a reason for hiding this comment

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

I'm fine with the first two commits but the third commit has some translation stuff and I'm a bit confused. It seems like we decided not to do that, but perhaps I'm mistaken?


QString labelName;
if (! lua_isstring(L, 1)) {
lua_pushstring(L, tr("setLabelClickCallback: bad argument #1 type (label name as string expected, got %1!)")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your commit message doesn't mention translation?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not totally on-board with not coding for it at this point and was retaining the use of the methodology that I started using some (years ?) ago, should it become necessary to rip it all out it can be done but I don't want to do that until I am certain that it is totally irrelevant/harmful.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm certainly not asking you to remove any that are already in development.

I'm not saying you can't add these.

But it seems like we agreed not to translate the Mudlet API errors. These are the Mudlet API errors. Adding more because you're not on-board seems to run counter to working together, doesn't it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's going counter to the feedback we've received from international users and #904, so I agree it's something we've gotta reach a conclusion on.

@ahmedcharles
Copy link
Copy Markdown
Contributor

If you want, submit a PR with the first two alone and I'll approve.

SlySven added 2 commits April 23, 2017 02:02
…Translated

Neede to take on-board changes in error message creation (removal of ability
to translate them; change away from QString and related classes to produce
them).
Changes made in the series of commits making up this pull-request will
clash with other changes in TLuaInterpreter in a separate but now merged
pull-request initiated after this one was started.  By merging in the other
one and revising the changes in the third of the original commits in this
it will now be possible to merge the result back in to the development
branch without conflicts.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

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

Thanks @SlySven 😃

@ahmedcharles
Copy link
Copy Markdown
Contributor

Would you mind submitting the first two commits as a separate PR? There's no way to get this to have three commits using the web ui at this point.

@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Apr 24, 2017

@vadi2 @ahmedcharles do I have to re-base and do another (or more than one) PR again? 😢

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Apr 24, 2017

Maybe @ahmedcharles could help you sort it out. I'm happy with the code and can put up with the imperfect history. Not an expert in Git so doing any complex history rewriting besides commit amending is beyond me.

@SlySven SlySven added the On Hold PR on hold pending further discussion or other incident. label Apr 24, 2017
@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Apr 24, 2017

I think I will take another stab at it and split the bits up...

@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Apr 28, 2017

Right I have three commits onto the current (at the time of writing but the goal-posts move around rapidly nowadays 😉) development that do what was intended. As I see it I could force an overwrite to my Repo which will rewrite the history here but will look clean when welded into the branch. Or I can close this one as well and put them out as a third PR.

I am minded to go the second route.

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Apr 28, 2017 via email

@SlySven SlySven merged commit ba6e650 into Mudlet:development Apr 29, 2017
@SlySven SlySven deleted the Rebased_revise_ensureSysEventNamesNotTranslated branch April 29, 2017 01:11
@SlySven SlySven added 3 - Done and removed On Hold PR on hold pending further discussion or other incident. labels Apr 29, 2017
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

Successfully merging this pull request may close these issues.

3 participants