Difference between revisions of "Template:Diff since trans"

From Creative Commons
Jump to: navigation, search
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="text-align:right" class="plainlinks"><small>[http://wiki.creativecommons.org/index.php?title={{anchorencode:{{{1}}}}}&diff=&oldid={{{2}}} [Differences in English original since last translation]]</small></div></includeonly><noinclude>
+
<includeonly>{{Diff since trans/code
__NOEDITSECTION__
+
|source={{{source|}}}
 +
|rev={{{rev|}}}
 +
|message-diff-since-last-synch=You can help Creative Commons now&#44; by synchronising this translation with its original. Click 'Languages:' on the left for instructions.
 +
|message-translation-is-synched=This translation is synchronised with the latest revision of page
 +
|message-synchronise=synchronise
 +
}}</includeonly><noinclude>
 +
Every translation is the translation of a source page. That source page changes through time, and the translation becomes outdated.
 +
 
 +
Template '''{{PAGENAME}}''' verifies if the revision ID of a source page has changed. If it has, the template produces a "(synchronise)" link to what changes were done to the source page since that revision. If it hasn't, it produces a &#10004; to indicate that the translation is up-to-date.
  
{{Translations
+
This is a support template, and should not be used on normal content pages. It is used by [[Template:Translated From]], to place a "synchronise" link next to the language name if the translation is outdated.
  | articles=Template:Pt:Diferenças desde a tradução
 
}}
 
  
Translated pages are based on an original page in English. That original page changes through time and translations become outdated. This template can be used on translated pages, to verify what changes have been done to the original page in English since the last translation.  
+
This is an interface that supplies messages in English to the real code, available at [[Template:Diff since trans/code]]. Please translate this interface and the messages to your language. Refer to [[Template:Pt:Diferenças desde a tradução]] for an example.
  
 
== Use ==
 
== Use ==
<pre>{{Diff since trans|name of translated page|number of translated revision}}</pre>
+
<pre>{{Diff since trans|source=source page|rev=revision ID}}</pre>
  
The template creates a link on the right side of the page (see example below), which leads to the appropriate diff list. The template should normally be placed just above the <tt><nowiki>{{</nowiki>Translated From}}</tt> template which [[CcWiki:Translate|should also be placed in all translated pages]].
+
The supplied revision ID parameter should be the revision ID of the version of the source page that was the basis of the translation (see example below).
 +
 
 +
If the latest revision ID of the source page is different from the supplied revision ID, this template produces a "(synchronise)" link which leads to a differences list of the source page, between the supplied revision ID and the latest revision ID of the page.
 +
 
 +
In this way, any user can see what changed in the source page since it was last translated. The user can then easily bring the translation back into synch with the source, by translating the changes shown in the diff list. When doing so, the revision ID should be updated to reflect the new basis of translation.
 +
 
 +
'''''Note:''' You can find the revision ID of any revision of a page, by visiting the corresponding history and moving the pointer above any of the shown revisions; the revision number appears at the bottom of the browser window (in IE, at least.)''
  
 
== Example ==
 
== Example ==
For example, page [[Pt:Página principal]] is a translation into European Portuguese of revision 34884 of [[Main Page]] in English. So:
+
For example, say that page [[Pt:Página principal]] is a translation into European Portuguese of revision 34884 of the [[Main Page]]. So:
  
<pre>{{diff since trans|Main Page|34884}}</pre>
+
<pre>{{Diff since trans|source=Main Page|rev=34884}}</pre>
  
(or, in this case, the [[Template:Pt:Diferenças desde a tradução|Pt translation]] of this template) placed in page [[Pt:Página principal]], creates a link that shows all changes to [[Main Page]], since revision 34884, thus:
+
in [[Pt:Página principal]], produces a link that shows all changes to the [[Main Page]] since revision 34884, thus:
{{diff since trans|Main Page|34884}}
 
  
 +
{{diff since trans|source=Main Page|rev=34884}}
  
In this way it becomes easy for any user to verify whether the translation is synchronous with the English page, and anyone can easily bring it back in synch by translating the changes shown in the diff.
+
Follow the link to view the diff list.
 
 
'''''Note:''' Once a translation is synchronized again, please also update the number of the translated revision to reflect the new translated revision. You can find the revision number of any revision to a page, by visiting the corresponding history page and moving the pointer above any of the shown revisions; the revision number appears at the bottom of your browser window (in IE, at least.)''
 
  
 
== See also ==
 
== See also ==
Line 30: Line 40:
 
*[[Template:Translated From]]
 
*[[Template:Translated From]]
  
[[Category:Translation templates|{{PAGENAME}}]]</noinclude>
+
{{Translations
 +
| articles = Template:Pt:Diferenças desde a tradução
 +
}}
 +
 
 +
[[Category:Support translation templates|{{PAGENAME}}]]
 +
 
 +
__NOEDITSECTION__
 +
</noinclude>

Latest revision as of 20:05, 1 May 2011

Every translation is the translation of a source page. That source page changes through time, and the translation becomes outdated.

Template Diff since trans verifies if the revision ID of a source page has changed. If it has, the template produces a "(synchronise)" link to what changes were done to the source page since that revision. If it hasn't, it produces a ✔ to indicate that the translation is up-to-date.

This is a support template, and should not be used on normal content pages. It is used by Template:Translated From, to place a "synchronise" link next to the language name if the translation is outdated.

This is an interface that supplies messages in English to the real code, available at Template:Diff since trans/code. Please translate this interface and the messages to your language. Refer to Template:Pt:Diferenças desde a tradução for an example.

Use

{{Diff since trans|source=source page|rev=revision ID}}

The supplied revision ID parameter should be the revision ID of the version of the source page that was the basis of the translation (see example below).

If the latest revision ID of the source page is different from the supplied revision ID, this template produces a "(synchronise)" link which leads to a differences list of the source page, between the supplied revision ID and the latest revision ID of the page.

In this way, any user can see what changed in the source page since it was last translated. The user can then easily bring the translation back into synch with the source, by translating the changes shown in the diff list. When doing so, the revision ID should be updated to reflect the new basis of translation.

Note: You can find the revision ID of any revision of a page, by visiting the corresponding history and moving the pointer above any of the shown revisions; the revision number appears at the bottom of the browser window (in IE, at least.)

Example

For example, say that page Pt:Página principal is a translation into European Portuguese of revision 34884 of the Main Page. So:

{{Diff since trans|source=Main Page|rev=34884}}

in Pt:Página principal, produces a link that shows all changes to the Main Page since revision 34884, thus:


{{#ifeq:

   {{#show: Main Page | ?Last revision#=}}
   | 34884
   | 
   | (synchronise)

}}

Follow the link to view the diff list.

See also