Re: Conditions not satisfied when converting to HTML

2017-12-19 Thread Gunnar Hjalmarsson

On 2017-12-19 19:59, Petr Kovar wrote:

On Tue, 19 Dec 2017 11:38:09 +0100 Andre Klapper 
wrote:

On Mon, 2017-12-11 at 02:51 +0100, Gunnar Hjalmarsson wrote:

The markup code at gs-browse-web.page includes various
conditionals. However, none of the conditions seems to be
satisfied when converting to the HTML version of the page:

https://help.gnome.org/users/gnome-help/stable/gs-browse-web.html

When browsing gs-browse-web.page using yelp it seems to be >>> correctly 
rendered, though.

I don't know where the problem lies.


How could the software running behind help.gnome.org know on which
exact Linux distribution the user's browser is running? :) I guess
it could check the browser's user agent string. Does e.g. Ubuntu
patch all the browsers shipped in Ubuntu to include some special
"Ubuntu" line in the browsers' user agent strings?


This is indeed a valid issue. The content at
https://help.gnome.org/users/gnome-help/stable/gs-browse-web.html is
incomplete and thus broken because the site scripts just call
yelp-build and serve the output as static HTML on the site, I
believe. Running yelp-build locally shows that the conditional
content is dropped from the HTML output.


Right, that's what I tried to say in my first message, but I was 
probably not crystal clear. ;) One way to handle that particular page is 
to test also for "target:html"; please see the attached patch. But with 
my Ubuntu hat on, I hope for a smarter solution.


We build the docs on the Ubuntu site too:

https://help.ubuntu.com/17.10/ubuntu-help/

Ideally I'd like to see a solution which would make yelp-build output 
'vanilla GNOME' options when converting to HTML for help.gnome.org, 
Ubuntu options when converting to HTML for help.ubuntu.com, etc. It 
would be great if there is some way to make yelp-build recognize the 
platform on which it's run, and adapt the output accordingly.



Shaun, could shed some more light on how yelp-build treats
conditional content?


Thanks!

--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj
--- a/gnome-help/C/gs-browse-web.page
+++ b/gnome-help/C/gs-browse-web.page
@@ -38,7 +38,7 @@
 
 
 
+platform:opensuse, platform:sled, platform:sles, target:html">
 
 
@@ -81,7 +81,7 @@
 
 
 
+platform:rhel, platform:ubuntu, platform:opensuse, platform:sled, platform:sles, target:html">
 
 
___
gnome-doc-list mailing list
gnome-doc-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-doc-list


Re: Conditions not satisfied when converting to HTML

2017-12-19 Thread Petr Kovar
On Tue, 19 Dec 2017 11:38:09 +0100
Andre Klapper  wrote:

> On Mon, 2017-12-11 at 02:51 +0100, Gunnar Hjalmarsson wrote:
> > The markup code at gs-browse-web.page includes various conditionals. 
> > However, none of the conditions seems to be satisfied when converting to 
> > the HTML version of the page:
> > 
> > https://help.gnome.org/users/gnome-help/stable/gs-browse-web.html
> > 
> > When browsing gs-browse-web.page using yelp it seems to be correctly 
> > rendered, though.
> > 
> > I don't know where the problem lies.
> 
> How could the software running behind help.gnome.org know on which
> exact Linux distribution the user's browser is running? :)
> I guess it could check the browser's user agent string. 
> Does e.g. Ubuntu patch all the browsers shipped in Ubuntu to include
> some special "Ubuntu" line in the browsers' user agent strings?

This is indeed a valid issue. The content at
https://help.gnome.org/users/gnome-help/stable/gs-browse-web.html is
incomplete and thus broken because the site scripts just call yelp-build
and serve the output as static HTML on the site, I believe. Running
yelp-build locally shows that the conditional content is dropped from the
HTML output.

Shaun, could shed some more light on how yelp-build treats conditional
content?

(Just to clarify, in gs-browse-web we check for the user's distro, not
browser. Browser check is not implemented.)

Thanks,
pk
___
gnome-doc-list mailing list
gnome-doc-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-doc-list


Re: Conditions not satisfied when converting to HTML

2017-12-19 Thread Andre Klapper
On Mon, 2017-12-11 at 02:51 +0100, Gunnar Hjalmarsson wrote:
> The markup code at gs-browse-web.page includes various conditionals. 
> However, none of the conditions seems to be satisfied when converting to 
> the HTML version of the page:
> 
> https://help.gnome.org/users/gnome-help/stable/gs-browse-web.html
> 
> When browsing gs-browse-web.page using yelp it seems to be correctly 
> rendered, though.
> 
> I don't know where the problem lies.

How could the software running behind help.gnome.org know on which
exact Linux distribution the user's browser is running? :)
I guess it could check the browser's user agent string. 
Does e.g. Ubuntu patch all the browsers shipped in Ubuntu to include
some special "Ubuntu" line in the browsers' user agent strings?

If that's the case you could file an enhancement request:
https://bugzilla.gnome.org/enter_bug.cgi?product=website

andre
-- 
Andre Klapper  |  ak...@gmx.net
http://blogs.gnome.org/aklapper/
___
gnome-doc-list mailing list
gnome-doc-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-doc-list


Lists

2017-12-19 Thread Hannie Dumoleyn

Hi,

While reviewing gs-use-system-search I decided to remove "and" from the 
list of matching items, see last comment here [1].


I checked the style guide [2]  and found this: Do not connect list items 
with conjunctions such as "and" or "or".


If you agree, I think gs-use-system-search can be pushed to master (I 
will not do it myself, as promised). The one trailing whitespace, see 
[1], is not of great importance.


Hannie

[1] https://bugzilla.gnome.org/show_bug.cgi?id=791340

[2] https://developer.gnome.org/gdp-style-guide/2.32/infodesign-12.html.en

___
gnome-doc-list mailing list
gnome-doc-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-doc-list