vogel612 / translationhelper Goto Github PK
View Code? Open in Web Editor NEWPersonal Helper to translate Rubberduck
License: MIT License
Personal Helper to translate Rubberduck
License: MIT License
Adding a new locale without the referenced file existing results in exceptions. Since our error-handling is bad, this is bad. We can avoid creating errors by creating the necessary file. Probably just an empty resx-definition should be sufficient.
We could also make the code loading ResourceSets more resilient. Decide on which (if not both ideas) to implement and fix this mess
The TranslationHelper could just prompt the user for the Folder / File to translate at the beginning of execution.
Beware that there may be different Filenames under the same Folder. Locale switching also needs to adapt!
It must be possible to configure projects from within the Application.
This means we need to allow:
On Startup the localeCache of ResxChooser is not filled correctly with the available locales.
Chosing the same file as given on startup does fill the cache correctly.
Investigate and fix.
This should be helpful to clarify what still needs translating and what doesn't.
Well almost. It should be possible to choose an arbitrary .resx
file (including a Language-LOCALE combination) and use that as the basis for Translations.
Edgy points and Todo list.
NullPointerException in FilesetOverviewModel ln. 72 and all the other stuff that can go wrong should result in some useful feedback to the user.
Everybody loves coverage!
We do have the Locale-choice dialog. Unfortunately it seems to not quite get notified about which locales are available. Investigate and fix
The UI doesn't make it very clear that the left-hand side resx is readonly, and the resx to edit goes on the right-hand side.
It's not necessarily a problem, but then there should be a one-click button to swap the two sides.
It must be possible to persist (and retrieve) project configurations, preferrably in plaintext.
Project files should keep references to the .resx files used, their names and what locales should be available.
Display the relevant translation keys side by side.
Depending on my mood any keys not present in the "root" file may or may not be displayed.
In the very least we need all keys of the "root" file to show up properly.
The probably best solution for this is a table-like structure. Stay scrollable ;)
Right now for translation you will need to click at least thrice:
twice to open the window (yes doubleclick is two clicks...)
and once to say: "Okay this one's in"
It should be possible to get the translation window to show up when pressing Return, to accept a translation with return and to cancel a translation with edit.
For the translation: respect multiline translations! (Shift + Return should be good)
An empty locale is used as default locale. We should support that by not exposing it for deletion in ResourceSets
The css-drop-shadow on selection makes everything unreadable. All the stuffz are too close, and the general design needs a bit of an update.
So I just stumbled upon this in the code:
// FIXME: send that to the presenter so we can clean up and close shit!
and my past self is completely right. We should check the WindowClosing event for unsaved changes and prompt the user when they want to close this
Edit a single translation.
It may be preferrable to do this in a separate view. Important to note is, that the "root file" may not be edited in this case.
The simplest is probably a small frame with one display box one textbox and two buttons
Clicking the "Save" button produces no feedback whatsoever: it's impossible to know if the save was successful without actually going and verifying the file.
Also the button has no feedback on hover or on click, so we don't actually know if anything happened.
Currently the TableView in the JavaFX version of the Overview doesn't highlight rows like the Swing implementation does.
Fix this.
The Communication between Presenter, Model and View needs an overhaul.
Instead of the Presenter registering itself at the Model and View, those two should expose methods to allow event subscriptions, preferrably over @FunctionalInterface
and related methods.
Clean that UI up. Especially the ResxChooser is atrocious.
As of now it's possible to circumvent the unsaved changes check by switching the fileset.
We should really make sure that we ask before discarding work
If you switch the Views, the Scene resizes, since the same Stage is used. Unfortunately this means the size is forgotten anytime you switch scenes.
Proper fix is: Create a scene for every view instead of sharing one.
This should already work properly if we actually start to implement .hide
in the Views / Controllers
Cancelling translation currently just closes the scene... not good.
So after using this for a while I began to realize that the process begins to hog incredible amounts of memory and cpu time.
On my machine it started out with ~3% mem / ~0.4% CPU
. When performing around 10 edits the respective values are. ~30% mem / ~ 180% CPU
. These values are reported by Ubuntu's top
.
These values also negatively affect UI. The translation view takes time to display and then often shows the previously edited Translation. Also the Table in the OverviewView updates tremendously slow
Nothing big, just don't bail out early when the number of arguments is != 1 and instead select them in the presenter before wiring it into the view
So maybe someone wants to use this for something other than German...
also I rather dislike how the model loads the Document right now, and I need something to kick off the refactoring, so... this is it.. kinda
Feature request /enhancement: instead of browsing for individual .resx files, it would be nice if the tool could just prompt for the solution folder, and recursively pull every .resx file there is to find.
The editor would need a new "Source" column to show the source file for every key.
That way we could translate all files in one go.
I would have expected the textboxes to stretch instead.
PopUp dialogues should be moved out of the OverviewView Implmentations into a separate class.
We need:
Title, Prompt, OK, [Cancel], [Ignore]
OK, Cancel and Ignore need blocking callbacks, the Dialogues should be Application Modal and respect the chosen UI Framework
Currently we need to hack around to create a new project from scratch.
One way to fix this would be adding an option for a new project when choosing a file (bad, because mixed responsibilities) or creating a new project if we get an empty file.
Sometimes for asking back at the rubberduck team, it's better to have the Key that needs to be translated, so they have a better context and can give good advice to translating...
For this the simplest approach is exposing the key in the UI.
Best in the Translation View
Retailcoder.VBE/UI
isn't guaranteed to remain that way. Also since the .resx files are probably going to be split up, We cannot rely on their name in any way beside `Foo.LANG(-LOCALE)?.resx'
This needs to be fixed for Main
While Translating one might wonder how a certain phrase was translated.
It's important to be consistent and as such it helps if you can search for previous translations of the same word by checking through the previous values.
The only thing left to do before basic functionality is existent.
Take the in-memory JDOM2 Document and save it back to the resx-file we loaded it from
Updating anything in ResourceSet panels doesn't have any consequences (if we ignore adding and removing locales).
Changing resourceSet values should update those. We may need to retroactively reconfigure resource discovery.
Additionally adding and removing resourceSets currently is only possible by manually editing the project file, which means it's a mess.
To prevent runtime errors when translations become outdated and don't contain the correct format specifiers anymore it should be easy to find such mismatches between translations,
Highlight color would be Orange
Currently on windows serializing the THP file results in Pathspecs with backslash. This can't be used on Linux-Systems. The other way round works, though.
As such all paths should be serialized with simple slashes as fragment-separators
ESC doesn't do anything if nothing was typed in the right-hand side.
Sometimes the app doesn't properly shut down when closing the window. Find out why and fix it...
that says it all. We need a way to read a resx file into a DOM tree.
This is required to be able to display it to the user
While Translating the last swoop of Changes I saw "Type" and "Module" at least thrice or so.
It might be interesting to find similar Words for Key-Maintenance. As such it might be helpful to support ordering the table alphabetically by Value and not by key
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.