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

Use or remove unused strings #4789

Closed
DorpsGek opened this issue Oct 2, 2011 · 2 comments
Closed

Use or remove unused strings #4789

DorpsGek opened this issue Oct 2, 2011 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Oct 2, 2011

monoid opened the ticket and wrote:

There are a few unused strings remaining. These two patches make use of the strings that are still useful, and removes the unnecessary ones.

The first patch does some of this cleanup in a straightforward way. The otherwise-unused strings STR_STATION_BUILD_AIRPORT_TOOLTIP, STR_CONTENT_MATRIX_TOOLTIP and STR_NEWGRF_SETTINGS_FILE_TOOLTIP (slightly edited) are used in their appropriate locations, while STR_ERROR_BRIBE_FAILED and STR_ERROR_BRIBE_FAILED_2 are merged to just a single string, since ShowErrorMessage can now handle wrapping long strings. The unused strings STR_SORT_BY_POPULATION, STR_PLAYLIST_SAVE, STR_PLAYLIST_TOOLTIP_SAVE_MUSIC_SETTINGS, STR_NEWGRF_SETTINGS_PARAMETER_QUERY, STR_ORDERS_GO_TO_DROPDOWN_TOOLTIP, and STR_ERROR_TOO_CLOSE_TO_ANOTHER_RAILROAD are removed.

The second patch makes use of the otherwise-unused STR_NETWORK_ERROR_NOSERVER, which takes a little more effort. The tick-based ratelimit for LAN UDP broadcasts is changed so that it is also used for master server UDP queries. When no games are found in a given search period, the STR_NETWORK_ERROR_NOSERVER error message is shown as a warning. In addition, the find servers button in the network GUI is disabled during the search period.

This should, in theory, leave only one unused string: STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_CONNECTION_LOST. I couldn't find a sane place to make use of that, but it seems like it should still be used somewhere.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4789
@DorpsGek
Copy link
Member Author

frosch wrote:

No idea what happened with this. Apparently parts were commited in r18333.

A scripted analysis of current trunk reveals these strings as currently unused:

STR_CONFIG_SETTING_DISABLED
STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_CONNECTION_LOST
STR_JUST_DATE_SHORT
STR_NETWORK_CONNECTING_SPECIAL_2
STR_NETWORK_ERROR_CLIENT_START
STR_NETWORK_ERROR_NOSERVER
STR_NETWORK_ERROR_TIMEOUT
STR_SIGN_LIST_CLEAR
STR_SIGN_LIST_CLEAR_TOOLTIP


This comment was imported from FlySpray: https://bugs.openttd.org/task/4789#comment11755

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Partially implemented per https://bugs.openttd.org/task/4789# comment11755

Respecting remainder of patch: mass closure of patch tickets with no recent commentary. Goal is to reduce patch queue as an experiment to see if it aids faster reviewing and rejection/acceptance (it may not). If this offends you and the patch is maintained and compiles with current trunk, discuss with andythenorth in irc. (andythenorth has no ability to review patches but can re-open tickets). Thanks.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4789

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant