Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Wider dashes for title bar #707

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

h-h-h-h
Copy link

@h-h-h-h h-h-h-h commented Sep 18, 2015

Hello,

this pull request lets an em dash or en dash instead of a hyphen appear in the title bar of the main window. I've only researched/known the English and German style, the other languages are set to English style but can be easily changed.

  • English example: Project Name — SharpDevelop
  • German example: Project Name – SharpDevelop

Here are some references about why changing the very short hyphen to a wider dash:

@lvv83
Copy link
Contributor

lvv83 commented Sep 18, 2015

Why em dash symbol should be localizable? Its identical for all cultures.
Just replace dash with em dash - I think this is better option.

For resource file I prefer full format string. You can explore my pull request (#701) for example.

@h-h-h-h
Copy link
Author

h-h-h-h commented Sep 18, 2015

Its identical for all cultures.

No, for German an en dash is strongly prefered! As a reference, see the browser titles of the German Wikipedia articles: https://de.wikipedia.org/wiki/Aachen.

If there's ever going to be a need for additional parts in other window titles (e.g. the find-and-replace window), this separator can be used.

@lvv83
Copy link
Contributor

lvv83 commented Sep 19, 2015

Well. I see that discussion spread to another repo, so I'll answer for NPP members here.

This window title parts separator should be "translatable."

Why? @h-h-h-h, if you like Wikipedia site as an argument for your point of view, then please check Wikipedia not just for Germany & UK! Take a look for russian, portugal or any another regional site. Every page uses a wide dash for its title.

If there's ever going to be a need for additional parts in other window titles (e.g. the find-and-replace window)

Enumerate, please... There is dialog with "Search and Replace" title. No hyphens, no dashes. Ok, let some dialog static title should contain dash/hypen - then I'll make simple modification for aproppriate resource string inside resx-file, without your resource key for separator. If dialog title is dynamic - then we should use format strings. Again without your resource key for separator.

@h-h-h-h
Copy link
Author

h-h-h-h commented Sep 19, 2015

if you like Wikipedia site as an argument for your point of view, then please check Wikipedia not just for Germany & UK! Take a look for russian, portugal or any another regional site. Every page uses a wide dash for its title.

Português has an en dash, not an em dash. So, did you look at the title that came from HTML, or did you look at the additional dash the browser adds?

I investigated this. Here are the results for Wikipedia titles in different languages (coming from HTML):

  • Hyphen (-): 63 languages (mostly used without thinking about this topic in my opinion)
  • En dash (–): 15 languages
  • Em dash (—): 14 languages

This proves that SharpDevelop should adhere to the specific language conventions regarding this typographical aspect. How else should it be done as with a new resource key? Even more programs should do this!

If there's ever going to be a need for additional parts in other window titles (e.g. the find-and-replace window)

Enumerate, please.

I just generally thought about something like saved named find-and-replace pairs: notepad-plus-plus/notepad-plus-plus#452. This just shows that there can be a need for dynamic information in dialog titles.

@siegfriedpammer
Copy link
Member

«typographical aspect»... couldn't care less

@lvv83
Copy link
Contributor

lvv83 commented Sep 19, 2015

First, I'm not an expert in typography and there is not big difference for me between en-dash or em-dash.
If you want to provide culture specific dash style - welcome (of course if repository admins will agree)!

I just say that additional resource key like Global.WindowTitlePartsSeparator is very big overhead! Especially for translators, especially with resource value with leading and trailing spaces!

How else should it be done as with a new resource key?

I don't know how translation works in other projects, but Sharp Develop has a special translation staff like StringParser, so your issue can be solved with format string like this
{$MainDialogName} — {$ProjectName} (I think,special escape code should be used for xxx-dash here).
With static content we can use standard .NET mechanism.
Give to translators clean and transparent way to make theirs job!

With format string translator feel free to use any culture-specific dash, or use any another symbols like brackets, dots, parenthesis.

@h-h-h-h
Copy link
Author

h-h-h-h commented Sep 19, 2015

your issue can be solved with format string like this {$MainDialogName} — {$ProjectName} ... Give to translators clean and transparent way to make theirs job!

So essentially, I would replace the line

Title = e.Project.Name + ResourceService.GetString("Global.WindowTitlePartsSeparator") +
        ResourceService.GetString("MainWindow.DialogName");

with

Title = StringParser.Parse("${res:MainWindow.ProjectAndDialogName}",
        new StringTagPair("ProjectName", e.Project.Name));

which doubles the string SharpDevelop from MainWindow.DialogName.

I think,special escape code should be used for xxx-dash here

If edited in SharpDevelop, this RESX code looses its escaping:

<value>${ProjectName} &#x2014; SharpDevelop</value> 

@h-h-h-h
Copy link
Author

h-h-h-h commented Sep 19, 2015

I changed the pull request to use only one resource query per language or project change.

The dash types are now set according to the Wikipedia titles, except where a hyphen (-) was used, I used an em dash (—) in these cases (as in English).

The problem of a non-persistent escape sequence (&#x2014;) is still remaining.

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

Successfully merging this pull request may close these issues.

3 participants