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

Improvement: replace {{...}} #29

Open
homersimpsons opened this issue Mar 8, 2016 · 8 comments
Open

Improvement: replace {{...}} #29

homersimpsons opened this issue Mar 8, 2016 · 8 comments

Comments

@homersimpsons
Copy link

homersimpsons commented Mar 8, 2016

Let's replace the {{...}} to make a better dictionary, and easier reading

For example:

  • {{T|en}} becomes a little English flag ({{T|...}} mean traduction in ...)
  • {{trad+|en|coach}} becomes 'coach' and maybe it is possible to add a link to this word in an English dictionary
  • {{S|...}} is a new section, some formatting could ease reading
  • And there are a lot of other to properly format

Ressources:

@rdoeffinger
Copy link
Owner

Yes, the fact that there are so many, and that they are different in each regional wiktionary and that they should be replaced depending on dictionary language makes this very problematic.
Unfortunately it does not seem possible (easily/efficiently) to just use the engine that wiktionary uses, which seems the only "proper" solution to this.
For those reasons personally I am not planning any work on this so far, though if someone has a particularly nice idea to solve this or wants to work on it that's of course welcome.

@astoff
Copy link

astoff commented Sep 5, 2016

Are you aware of these scripts to dump Wiktionary into ding format?

@Jibec
Copy link

Jibec commented Jan 11, 2017

We probably should make lists of template replacement.

Somme examples:

  • global:
  • per language

I'll be glad help for french language.

Example "S" template, used in titles : {{S|(.)(|.)+}}

  • {S|étymologie}} => étymologie
  • {S|nom|fr}} => nom

This website is great to make easy tests: https://regex101.com/#python

some automatic test would be great to make sure we can maintain it
some automatic template detection (count results per language) would be great to know where to focus.

@rdoeffinger
Copy link
Owner

Now that I see it written, I also have a concern that the replacement must be done in a way that it's clear it's not actually part of the translation or so itself, since the user might not know some of those words in the language they are translating to.
Unless you mean {S|étymologie} would be replaced by the matching word in whatever the user's system language is, which would be a lot more effort though.

@Jibec
Copy link

Jibec commented Jan 16, 2017

Some templates are only for cosmetics, some are for "inclusion" (to include content from a template or sub-page), some are internal links, some are external links.
I did not mean to translate anything, "just" to create regex search and replace of text to make it clean when displayed to user.

Here is an article with an extensive usage of templates (63!):
https://fr.wiktionary.org/wiki/encyclop%C3%A9die?action=edit&veswitched=1

But when talking about internal (inside wiktionary in same or different language) links, you may want to create an articulation with currently installed dictionaries in user's smartphone, but I have no ideas how to handle this.

@happysmash27
Copy link

It would be nice if this could at least include conjugations, which is one of the main things I use Wiktionary for.

@woj-tek
Copy link

woj-tek commented Aug 14, 2023

Are you aware of these scripts to dump Wiktionary into ding format?

Sorry for necro-responding but (1) QuickDic was recently updated on F-droid and (2) the wikionary formatting is somewhat annoying so while looking for a way to make it better I stumbled against this issue and above comment and it looks quite awesome. While having full-blown dictionary with translation is great, having readable simple dictionary.

@DougInAMug
Copy link

Big table of wiki markup parsers: https://www.mediawiki.org/wiki/Alternative_parsers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants