[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#761861: marked as done (debsources: allow to override detected language type)



Your message dated Wed, 31 Dec 2014 15:10:58 +0100
with message-id <20141231141058.GA858@upsilon.cc>
and subject line Re: Bug#761861: allow to override detected language type
has caused the Debian Bug report #761861,
regarding debsources: allow to override detected language type
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
761861: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761861
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: qa.debian.org
Severity: normal
User: qa.debian.org@packages.debian.org
Usertags: debsources

[ bug originally reported by Stuart Prescott ]

The heuristics used to detect language type could be wrong (of course), it
would be nice to allow overriding detected language type with a ?lang=... URL
parameter.

A related problem is that we might wrongly detect that some file is not a
text-like file, and hence only offer to download it, rather than render it on
the web. E.g. http://sources.debian.net/src/make/latest/doc/make.info-4/
currently can only be downloaded, in spite of info being a textual file format.

In terms of code the semantic of a new "lang" URL parameter should therefore be
twofold:

- on one hand its presence should override the detection done by libmagic to
  decide whether to render or download a file (see
  http://anonscm.debian.org/cgit/qa/debsources.git/tree/python/models.py#n652 )

- on the other hand the language specified should override the heuristic based
  language detection. To simply force web display without requiring any
  highlighting, we could use something like ?lang=none


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

--- End Message ---
--- Begin Message ---
On Tue, Sep 16, 2014 at 02:18:36PM +0200, Stefano Zacchiroli wrote:
> The heuristics used to detect language type could be wrong (of course), it
> would be nice to allow overriding detected language type with a ?lang=... URL
> parameter.

This has now been implemented, in commit
180e97f37bbb44c0ebc3f9b6b2efd1f2d5bc097b, thanks to the work by
sophiejjj. The relevant URL syntax is documented at
http://sources.debian.net/doc/url/

Here is an example of how to force displaying as opposed to downloading:

  http://sources.debian.net/src/make-doc-non-dfsg/4.0-2/doc/make.info/?lang=none

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  zack@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Former Debian Project Leader  . . @zack on identi.ca . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

--- End Message ---

Reply to: