Update French & Turkish translations - #691
Merged
Merged
Conversation
Contributor
|
Hi @cardpuncher , Welcome and thank you very much for your effort! Hopefully we will have a new release real soon. Best regards! |
Contributor
Thanks for your work! 👌 |
ngosang
pushed a commit
to ngosang/amule
that referenced
this pull request
Jul 29, 2026
…#691) Since amule-project#440 the core resolves each ed2k server's host country and hands it to the GUI, but the two lists rendered the same piece of data two different ways: the peer list drew a flag bitmap, while the server list prefixed the Server Name column with the ISO code ("de - ServerName", or "? - " when unresolved). The prefix ate horizontal space in a column that is often too narrow already and broke up the name itself. The server list now draws the same flag the peer list does, with the same rule for the unresolved case: no icon rather than a placeholder. Getting an icon into that column meant finishing a migration that was started when the virtual lists landed and deliberately left out: the server list was the last report-mode CMuleListCtrl of the pair, and only a virtual list can answer OnGetItemColumnImage per row. CServerListCtrl now derives from CMuleVirtualListCtrl and renders its cells on demand from the model via GetItemColumnText, which also buys what the other virtual lists already have -- O(1) row lookup instead of the linear FindItem that RefreshServer, RemoveServer and HighlightServer each ran, a std::sort over the model instead of moving native rows, and one coalesced re-sort per update batch instead of an inline SortList per refreshed server. Ping, Users and Files are declared live-sort columns, so sorting by one of them now follows the data. Three things had to be rebuilt against the model rather than the native items: - The connected server's bold font moves from a per-item wxListItem to OnGetItemAttr; HighlightServer just moves m_connected and repaints. - FitColumnsToContent measures the model itself. wxLIST_AUTOSIZE is a no-op on a virtual control -- it has no native items to measure and returns a default width -- so only the header half can still be left to wxLIST_AUTOSIZE_USEHEADER. - RemoveAllServers collects its victims before deleting any, instead of deleting while walking row indices. The confirmations it raises run a nested event loop, and a row index does not survive that; a server pointer does. The flags go in a small image list owned by this one control, seeded with the header sort arrows so they keep their indices, rather than in the list every CMuleListCtrl shares. Each flag is padded onto a transparent 16x16 cell -- wxImageList has one fixed size, and the bundled flags are 16x11, so adding them as-is would stretch them. The gate deciding which country code to show was duplicated between the two lists, and the server list's copy had an extra thePrefs::IsGeoIPEnabled() check that the peer list deliberately does not have. It is redundant on both paths: the core only emits its country tag when its resolver is on, so a tag received over EC already implies it, and the monolithic local lookup is guarded by the resolver's own IsEnabled(). On amulegui that pref is merely a mirror of the core's, refreshed at prefs-sync time, so consulting it could only ever disagree with the tag we were handed. Both lists now share GetDisplayCountryCode(). That helper is a header, not a .cpp, because the answer depends on ENABLE_IP2COUNTRY / CLIENT_GUI and those are per-target compile definitions. CountryFlags.cpp -- the obvious neighbour -- is built into muleappgui, one static library linked into both binaries with neither define set, where it could only ever produce the amulegui answer. Two base-class methods assumed native items and were dead against a virtual model: GetSelectedItems returned nothing, and DeleteAllItems left the model holding pointers to objects the caller was about to free. Both are now handled in CMuleVirtualListCtrl. No new translatable strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there,
Firstly, thanks a ton for working on aMule. I was astonished to see that there was new activity, so here are updated French and Turkish translations, both completed. In French I mostly removed the "AI translation please review" comments because those translations were almost all good. Turkish took a bit more time, but here it is. Again, thanks a lot and keep up the good work :)