Template talk:Repo link: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(→‎Todo list: new section)
(→‎Todo list: I think those are good ideas, that would require less typing and maintenance as well as give a more consistent styling)
Line 68: Line 68:
* {{obr}}Fgaddon repo{{cbr}}
* {{obr}}Fgaddon repo{{cbr}}
* {{obr}}Aircraft repo{{cbr}}
* {{obr}}Aircraft repo{{cbr}}
{{unsigned|12:35, 20 May 2015|‎Red Leader}}
: I think those are all good ideas.  I added {{tl|readme file}} the other day.  As I was just looking at {{tl|repo link}} to add links to relevant source code files related to the [[Conditions]] article I got reminded by the beauty of less typing. ;-)
: In addition I was also reminded about that a more specific template is easier to update when a repository move.  Consider for example if {{tl|repo link}} would be used as I mentioned above, linking to a source code file related to an article.  If that repository would be moved again or get another URL structure ''all'' links to that repository would have to be updated.
: A more specific link at the other hand, say {{obr}}simgear file{{cbr}} would only require that specific template to be changed.  In addition all links to any of those source files would have the same style, which to some extent will making them more intuitive.
: In essence, more specific link templates should:
:* Require less typing
:* Require less maintenance
:* Give a more consistent style
: —[[User:Johan G|Johan G]] ([[User_talk:Johan_G|Talk]] | [[Special:Contributions/Johan_G|contribs]]) 17:06, 20 May 2015 (EDT)

Revision as of 21:06, 20 May 2015

needs to be updated for different protocols

specifically for git:// - which will help centralize all repo URLs - e.g. to replace all URLs with a corresponding template, instead of having git://git.code.sf.net/p/flightgear/simgear everywhere - we should probably introduce a proto parameter that defaults to http/https and which can be overridden so that "git" can be specified. We want to avoid having to manually update all related articles in the future (if/when another repository needs to be moved) - e.g. [1].

--Hooray (talk) 17:10, 4 April 2015 (EDT)


Sorry that I do not understand you, but do you mean the URL in the template or URLs spread out in articles literally?
Johan G (Talk | contribs) 18:34, 4 April 2015 (EDT)
the latter - currently, we cannot use either of those templates to update the "building FG" docs accordingly, many of which contain now wrong links to the repositories - especially those using the git protocol - so it would be better to either have 3 templates, or one parameterized template returning the requested repository URL, including the proper format - so that we can use {{SimGear repo|proto=git}} or something like that. Otherwise, we will have to update dozens of references manually whenever there's a similar change (thanks for your recent changes though!). Just imagine, repositories would have to change again some time soon - we would have to manually update all URLs again. So let's better use a template for such things, analogous to how the "Next Newsletter" template serves as a "pointer" and can be easily changed, without having to update any locations using it. --Hooray (talk) 18:48, 4 April 2015 (EDT)


Ah, I think I get it now. In other words {{repo link}} is just as much maintenance as having bare URLs, but if adding more specific links, like your {{SimGear repo}} example the maintenance would more or less be only changing that template.
If so that is one case where a definitively see a meta template used by other link templates as useful. The repo specific templates would in this context use {{repo link}} to simplify them.
Repo specific links could also be more tailored to their needs, for example possibly using unnamed parameters for the parameters that are more or less always used (in essence less typing, I'm a lazy dude ;-) and have parameters more relevant to the context, for example {{FGAddon repo | B-1B | Systems/b1b-autopilot.xml | rev=3}}.
Johan G (Talk | contribs) 12:10, 5 April 2015 (EDT)
correct, I am basically thinking along the lines of using/generalizing existing templates to generalize our "hard-coded" (for the lack of a better term) repository URLs in pretty much all wiki articles - so that updating repository URLs in the future will be mainly a matter of changing 2-3 templates. Which is why I suggested to also add support for different protocols, so that those templates can also be used for instructions on cloning/pulling using non-default (non-http) protocols. This would also allow us to introduce meta templates for document clone/update/pull instructions using a single template for different front-ends - possibly even including annotated screen shots. We kinda started preparing this a while ago by introducing templates like these:
* http://wiki.flightgear.org/Template:Git_clone
* http://wiki.flightgear.org/Template:Git_checkout
* http://wiki.flightgear.org/Template:Git_push
Once we adapt the new repo link template, we could easily use that for also maintaining everything easily. And the corresponding clone/checkout/push and pull templates could also contain instructions for different front-ends (think git command line vs. TortoiseGit), to help generalize our docs, especially for people on Windows/Mac OSX not as familiar with CLI environments.--Hooray (talk) 12:59, 5 April 2015 (EDT)

FlightGear have completed the move from Gitorious

Cquote1.png FlightGear has completely moved all its gitorious based material over to< sourceforge. But it's nice to know a historical record will remain at gitorious.org as well as several other public locations not to mention on a myriad of personal computers.
Cquote2.png

Copied from this edit.

Johan G (Talk | contribs) 10:54, 18 April 2015 (EDT)

Todo list

A list to record changes to repository link templates. Feel free to contribute.

Questions:

  • XX link or XX repo?

FlightGear source template

Name ideas:

  • {{Flightgear link}}
  • {{Source link}}

SimGear template

Name ideas:

  • {{Simgear link}}

fgdata template

Name ideas:

  • {{Fgdata link}}

FGAddon template

Name ideas:

  • {{Fgaddon link}}
  • {{Fgaddon repo}}
  • {{Aircraft repo}}

This unsigned comment was added by ‎Red Leader (Talk | contribs) 12:35, 20 May 2015 (UTC)


I think those are all good ideas. I added {{readme file}} the other day. As I was just looking at {{repo link}} to add links to relevant source code files related to the Conditions article I got reminded by the beauty of less typing. ;-)
In addition I was also reminded about that a more specific template is easier to update when a repository move. Consider for example if {{repo link}} would be used as I mentioned above, linking to a source code file related to an article. If that repository would be moved again or get another URL structure all links to that repository would have to be updated.
A more specific link at the other hand, say {{simgear file}} would only require that specific template to be changed. In addition all links to any of those source files would have the same style, which to some extent will making them more intuitive.
In essence, more specific link templates should:
  • Require less typing
  • Require less maintenance
  • Give a more consistent style
Johan G (Talk | contribs) 17:06, 20 May 2015 (EDT)