-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Use translations for common constants #166
base: master
Are you sure you want to change the base?
Conversation
Two worries:
|
Oh, sorry. I just looked at the diff, not your comment! How about just having a string constant |
|
Land after racket/string-constants#44 |
Yes/No may lose shortcuts but these are currently non-translatable anyway. Signed-off-by: Alexander Shopov <[email protected]>
The checks fail becuase the updates to the string constants have not been merged. |
The addition of the dependency from We could try to limit the amount of memory that a dependency would bring, or we could add optional, keyword arguments to these functions and then have framework/gui-utils supply translations of those arguments (exporting functions to be called in place of |
Did I really do that? |
The pkg level dependency was there; the module level one wasn't, I believe.
Robby
…On Wed, Feb 19, 2020 at 10:15 PM Alexander Shopov ***@***.***> wrote:
The addition of the dependency from racket/gui to string-constants is
problematic.
Did I really do that? gui-lib/info.rkt already contained ["string-constants-lib"
#:version "1.24"], I just bumped it up to 1.33. Are there so many new
messages and are they loaded at the same time to take up this additional
memory? I though that there is only one translation loaded at a single time
so even though some more need more memory - that will be offset by the
removal of the English versions.
While I did add string-constants to required of
gui-lib/mred/private/messagebox.rkt, gui-lib/mrlib/terminal.rkt already
did that and there are many more other files requiring the library so this
package has already been used - git grep '[(]string-constant' | wc -l in
the repo gives more that 360 usages. What am I missing in the picture and
how can I improve things?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#166?email_source=notifications&email_token=AADBNMA5Q7ZCRM6O3NHNWPDRDX7W5A5CNFSM4KWDH372YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMKVLIA#issuecomment-588600736>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBNMBZAD4NKMIDBEKBS6TRDX7W5ANCNFSM4KWDH37Q>
.
|
I have not added anything on module level. The whole change was bumping the dependency at pkg level and using 3 constants. Perhaps there is something trivial I am overlooking. |
The issue is the addition of the new line 7 in gui-lib/mred/private/messagebox.rkt. That makes the memory use of the programs that Matthew reported jump and what I mean by "adding a dependency" from racket/gui to string-constants. Does this make more sense? |
I don't think we can merge this one in its current state. We could change things by some how parameterizing |
Would it be horrible to add optional arguments to We could document this in the docs for |
I have no firm opinion on that. I guess it would be ok. Smooth running of
Racket is the priority.
На нд, 27.09.2020 г. в 21:46 Robby Findler <[email protected]>
написа:
… Would it be horrible to add optional arguments to message-box (and
friends) but where their default values were determined by some mutable
state and then have the framework gui library mutate that state (using
string constants)?
We could document this in the docs for message-box (since a dependency in
the documentation is okay), telling people that something fishy is going on.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#166 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADNWT2BXYNPZPJYIF3T2ULSH6I73ANCNFSM4KWDH37Q>
.
|
Yes/No may lose shortcuts but these are currently non-translatable anyway.
Signed-off-by: Alexander Shopov [email protected]