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

Update header.phtml #23

Closed
wants to merge 1 commit into from
Closed

Update header.phtml #23

wants to merge 1 commit into from

Conversation

milotype
Copy link
Contributor

To improve the multilinguality of the website in web-search results, I propose some changes in the meta tags of the of the „header.phtml” file. The idea is to use translated text for the other languages.

Changes would be made for:
a) meta property="og:title"
b) meta property="og:description"
c) meta name="description"

It has something to do with php stuff. As I’m not a programmer, I’m not sure if this solution works, nor if it is legit. But something similar is being used in the „menu.phtml” file.
!!! Please see the diff between my new file and the orig file on master !!!

P.S.
I’ve checked my „experiment” at https://metatags.io/
It seems that html-tags within then strings don’t matter (which I was afraid of).

If my changes don’t work, maybe somebody knows how to handle the issue. But that would probably be something for a feature request ...

To improve the multilinguality of the website in web-search results, I propose some changes in the meta tags of the <head> of the „header.phtml” file. The idea is to use translated text for the other languages.

Changes would be made for:
a) meta property="og:title"
b) meta property="og:description"
c) meta name="description"

It has something to do with php stuff. As I’m not a programmer, I’m not sure if this solution works, nor if it is legit. But something similar is being used in the „menu.phtml” file.
!!! Please see the diff between my new file and the orig file on master !!!

P.S.
I’ve checked my „experiment” at https://metatags.io/
It seems that html-tags within then strings don’t matter (which I was afraid of).

If my changes don’t work, maybe somebody knows how to handle the issue. But that would probably be something for a feature request ...
@milotype
Copy link
Contributor Author

Also, it would be good to automatically add the lang-attribute within the <html> tag, depending on the laguage of the generated file (probably with some php calling, like lang="<?= $language; ?>.). Sorry that I don't know how to implement that. :-(
For instance, the resulting croatian page would have the following:
<html xmlns="http://www.w3.org/1999/xhtml" lang="hr">

Copy link
Member

@fellen fellen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look for this after the 3.5 release this weekend.

<meta property="og:type" content="website"/>
<meta property="og:url" content="https://www.gnucash.org/"/>
<meta property="og:image" content="https://www.gnucash.org/externals/logo_w120.png"/>
<meta property="og:site_name" content="GnuCash"/>
<meta property="og:description" content="A personal and small-business financial-accounting software, licensed under GNU/GPL and available for Linux, Windows, Mac OS X, BSD, and Solaris."/>
<meta property="og:description" content="<?=T_("<span class="gnucash">GnuCash</span> is personal and small-business financial-accounting software, freely licensed under the <a href="https://www.gnu.org/">GNU</a> GPL and available for GNU/Linux, BSD, Solaris, Mac OS X and Microsoft Windows.")?>"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line has several issues, see "Coding" Style in Website Maintenance.

As you seem more fluent in web design, you could improve the wiki page, too.

To prevent flame wars, we try to avoid specific keywords like "Gnu" and "Microsoft".
@gjanssens @jralls Your opinion?

IMHO "double entry accounting" should become part of the keyword list. Suggestion?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to avoid "Gnu" and "Microsoft", as well as to add "double entry accounting" into the meta-tag Description, my proposal would be:
<span class="gnucash">GnuCash</span> is a personal and small-business financial software with double entry accounting, licensed under the <a href="https://www.gnu.org/">GPL</a> and freely available for Linux, BSD, Solaris, Mac OS X and MS Windows.
This could be done either by changing the current original string in the po file (#: index.phtml:38), or by adding a new string to the po file. In both cases translations would need to be updated.

BTW, separate descriptions tags in the area of html files are nowadays not recommended any more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternative:
instead of "… freely available for …", it could be "… a free personal …"

<span class="gnucash">GnuCash</span> is a free personal and small-business financial software with double entry accounting, licensed under the <a href="https://www.gnu.org/">GPL</a> and available for Linux, BSD, Solaris, Mac OS X and MS Windows.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The standard term is "Free Open Source" or sometimes "Free/Libre Open Source". Capitalize Free because it's Free as in Freedom as opposed to free as in free beer.
The core of GnuCash is double-entry accounting and the target user population is personal and (very) small business.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have mixed feelings about the name GNU/Linux, I think it's RMS taking credit for more than GNU is due.
OTOH it should be "Apple MacOS™" (it's not "Mac OS X" anymore) and "Microsoft Windows™", those are the registered trademark names of the operating systems.

Copy link
Member

@fellen fellen Mar 31, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

externals/header.phtml Show resolved Hide resolved
@fellen
Copy link
Member

fellen commented Aug 15, 2019

In between I created https://wiki.gnucash.org/wiki/Website_Maintenance#Metatags to collect some relevant info.

Because Google restricts the length of the description to 105 chars and generates keywords from it in descending priority, I would drop company names.

My personal preference of terms:

  1. Double-entry accounting
  2. Free open source software
  3. personal and small-business
  4. for Linux, Windows, Macos, BSD ...

Has anybody recently built for Solaris? Our wiki page is from 2007 (2.2.0)

@jralls
Copy link
Member

jralls commented Aug 15, 2019

We should probably remove all mention of Solaris. Aside from museums with old Sun workstations it's nowadays used only on Oracle servers.

As for BSD, OpenBSD and FreeBSD seem to work more-or-less OK, NetBSD has some issues.

@fellen
Copy link
Member

fellen commented Oct 6, 2020

@milotype I had not realized, your description was the first sentence from index. So I have merged commit 062affd as preview in our beta branch. You can review it at https://www.gnucash.org/beta.

Note: Quotes inside of quotes needs escaping as you remember from https://wiki.gnucash.org/wiki/Translation#Special_characters_and_other_tips. But in this case that was not sufficient as we had 3 levels of quotes. So I have finally choosen strip_tags($description) in the meta section. there is still much to do, but you had a very good idea.

@milotype
Copy link
Contributor Author

milotype commented Oct 6, 2020

@fellen Thanks for looking into it ... https://www.gnucash.org/beta returns a 404 Not Found page. If there's anything I can help with, please let me know.

@fellen
Copy link
Member

fellen commented Oct 6, 2020

https://www.gnucash.org/beta returns a 404 Not Found page.

Sorry, beta is no page, but a directory. It should be
https://www.gnucash.org/beta/

If there's anything I can help with, please let me know.

Yes,

Known issues:

  • og:url should return the current page instead of the start page.

  • some pages still needs to set the description - my next target.

@fellen
Copy link
Member

fellen commented Jan 2, 2021

I am closing this PR. Almost all aspects have been merged in between.
The exception is the content of externals/global_params.php:$default_description, but that is now discussed in PR #41 .

@fellen fellen closed this Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants