Difference between revisions of "Template:Diff since trans"
Line 8: | Line 8: | ||
Every translation is the translation of a source page. That source page changes through time, and the translation becomes outdated. | 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 link to what changes were done to the source page since that revision. | + | 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 ✔ 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 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. | ||
Line 19: | Line 19: | ||
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). | 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 link which leads to a differences list of the source page, between the supplied revision ID and the latest revision ID of the page. | + | 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. | 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. | ||
Line 30: | Line 30: | ||
<pre>{{Diff since trans|source=Main Page|rev=34884}}</pre> | <pre>{{Diff since trans|source=Main Page|rev=34884}}</pre> | ||
− | in [[Pt:Página principal]], produces a link that shows all changes to the [[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|source=Main Page|rev=34884}} | {{diff since trans|source=Main Page|rev=34884}} | ||
+ | |||
+ | Follow the link to view the diff list. | ||
== See also == | == See also == | ||
Line 41: | Line 43: | ||
| articles = Template:Pt:Diferenças desde a tradução | | articles = Template:Pt:Diferenças desde a tradução | ||
}} | }} | ||
+ | |||
+ | [[Category:Support translation templates|{{PAGENAME}}]] | ||
__NOEDITSECTION__ | __NOEDITSECTION__ | ||
− | |||
− | |||
</noinclude> | </noinclude> |
Revision as of 11:36, 26 April 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.