Comments (8)
I assume this is a request about the addon manager and not the campaign selection screen?
from wesnoth.
This should be pretty straightforward. The addon manager is implemented in src/gui/dialogs/addon/manager.cpp and src/gui/dialogs/addon/manager.cpp; it already shows the list of translations, all that's needed is to add some UI to match against them.
from wesnoth.
Probably in the filter UI?
from wesnoth.
Yeah, the value of the search textbox could be matched against the text in the "Translations" label. Or maybe a dropdown could be added. A dropdown would have the advantage that a player could filter for several languages at once ("Campaigns with either Danish or Swedish translation").
from wesnoth.
Yeah, filtering for multiple languages is probably a good idea, and even if you didn't want to support that, I think a dropdown is better. Actually... maybe this is a place where a combobox would be the best choice - basically a cross between a text field and a combobox, so they can either pick a language from the menu or type in a language code in the text field.
from wesnoth.
Hello,
I am interested in adding this feature.
I am thinking of adding a dropdown, similar to the "Type"-dropdown.
"None"-translations will default to English translation.
As I am new could you give me some pointers as to where stuff is added to the UI?
from wesnoth.
Did you take a look at src/gui/dialogs/addon/manager.cpp
as mentioned by jostephd above? Anything specific you're missing? The related config is in data/gui/window/addon_manager.cfg
in case you haven't found it.
from wesnoth.
@soliton- Thx, addon_manager.cfg was what I was missing
So the feature is done, however I need to iron out some bugs and unwanted behaviour:
Firstly: When I select multiple languages, it can happen, that the list, where the addons are shown does not expand to fit the newly selected addons that fit the language filter and it throws the following error:
20220831 15:14:04 error gui/layout: grid [] place: Failed to place a grid, we have (1031,59) space but we need (1920,59) space. This happened at a grid with the id '' in a 'N4gui24gridE' with the id '' in a 'N4gui24gridE' with the id '' in a 'N4gui25panelE' with the id '' in a 'N4gui24gridE' with the id '_window_content_grid' in a 'N4gui24gridE' with the id '_content_grid' in a 'N4gui215scrollbar_panelE' with the id '' in a 'N4gui24gridE' with the id '' in a 'N4gui27dialogs13addon_managerE' with the id 'addon_manager'.
Did I miss some additional update_gui()
function to update the addon_list
. From what I see it should be done by apply_filters()
?
Secondly:
I scrape the addon.locales information vector for all available translations. The function langcode_to_string()
that is used to show which translations are available in the dedicated addon window does not give a readable language string for all languages, only langcodes (see picture). Should I only display those, for which langcode_to_string()
gives valid results or show everything that is indeed listed in the respective addon descriptions?
from wesnoth.
Related Issues (20)
- Please add a hotkey to reload last saved game HOT 3
- Steam version doesn't run on Ubuntu 22.04: missing libraries HOT 4
- [Lobby] When a game ends, focus shifting to another game is incomplete.
- Add translation status for mainline campaign in game HOT 2
- [MP] [King of the Hill] Add/Fix AI-WML Code to make "Reclaiming" Sides Effectively Target Central claimed castle. HOT 4
- [MP] In MP FFA Mode, if player side loses (all leaders and units gone), they should be moved as observers. HOT 5
- [Units] Giant Ant Egg/Fire Ant Egg: Document behavior that eggs hatch if adjacent eggs die. HOT 5
- Divide by zero at startup with flatpak build using wayland
- Expected Damage Taken / Inflicted Does Not Account For Drain In the Statistics Window, HOT 2
- Minimap escapes listbox in multiplayer lobby game list HOT 1
- Support fractional values for the pixel scale multiplier HOT 1
- The frequency slider for idle animations isn't disabled when the dialog is reopened
- The frequency slider for idle animations loads wrong value when the preferences dialog is opened HOT 1
- Did Acheivement "spoiler" ? HOT 5
- minor typo - append s HOT 2
- minor typo - add comma HOT 1
- minor typos HOT 1
- Problem in MatchHistory if side number differs from number of map starting positions HOT 2
- EI S10: "ghasts in cages" HOT 1
- updates to man pages HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wesnoth.