Team Nationality: British Founded: 1963 F1 Debut: 1966, Monaco Grand Prix Headquarters: Woking, Great Britain Team manager: Ron Dennis Post address: McLaren International, Woking Business Park, Albert Drive, Woking, Surrey, G21 5JY Drivers: Michael Andretti, Ayrton Senna
We will now learn how to implement the third row "F1 Debut" into the teamformat.
It contains a header "F1 Debut" and two comma separeted parts of data, a year ("1966") and a grand prix description. The latter needs to be translated. Here we have to consider two parts again, the national adjective ("Monaco") and the Grand Prix phrase.
To be able to handle the parts differently, we will split "F1 Debut" into three rows:
1) heading (F1 Debut)
2) year (1966)
3) grand prix (Monaco Grand Prix).
The data in the team.csv:
1992 | 1 |
Team | McLaren Honda |
Team (short) | McLaren |
Team Nationality | British |
Founded | 1963 |
F1 Debut | |
Debut year | 1966 |
Debut GP | Monaco Grand Prix |
Headquarters | Woking, UK |
Team manager | Ron Dennis |
Drivers | Ayrton Senna, Gerhard Berger |
In the teamformat.csv it will look like this:
English | Deutsch | Español | Français | Italiano | Transform | Lineformat |
Team | #team | |||||
Team (short) | #team | |||||
Team Nationality | Herkunftsland des Teams | Nacionalidad del equipo | Nationalité de l'écurie | Nazionalità scuderia | _nat | \$\:\%\n |
Founded | Gegründet | Fundado | Fondé | Fondato | _ | \$\:\%\n |
F1 Debut | F1 Debut | F1 Debut | F1 Début | F1 Debutto | \$\: | |
Debut year | _ | \%,_ | ||||
Debut GP | _grandprix | \%\n | ||||
Headquarters | Hauptsitz | Sede principal | Siège principal | Sede principale | _res | \$\:\%\n |
Team manager | Team-Manager | Jefe de equipo | Responsable de l'équipe | Procuratore scuderia | _name | \$\:\%\n |
Drivers | Fahrer | Pilotos | Pilotes | Piloti | _list-Names | \$\:\%\n |
Remember the replacement characters as given in the Guide:
Subst Replacement \$ Identifier resp. his translation \: Language specific colon, that is „ : “ for french, „: “ for other languages \% Transformed (translated and formatted) value from you data CSV \n CrLf to start a new line _ The underscore is replaced by a space character; it is needed to put a space at the beginning or the end of a value, because transform functions other than the empty one skip leading or trailing blanks.
As you see in the teamformat, for the heading we have to provide translations into the other languages which are given in the next four columns. The transform value "\$\:" contains the heading replace \$ and the colon replace \:.
Translation examples: "F1 Debut: " (español), "F1 Début : " (français).
No lineformat value is included here and with no linefeed the output will be continued into the same line of the gpeadia file.
The year will be taken as it is. The next four columns are blank here because we do not need a translation of "Debut year" as the only header is "F1 Debut". The transform function "_" leaves the value unchanged but does checking, i.e. you will get an error message in the log file, if a value is missing in this row of the team.csv file.
The lineformat value "\%,_" contains the value replace \%, a comma and the space replace "_". The comma is added unchanged to the gpaedia value as it is done with all characters included in the lineformat that are not replaced.
Translation will be from "1966" into "1966, ".
Together with the heading we now have "F1 Debut: 1966, " (español).
The Debut GP row value will be translated by the build in function "_grandprix".
In the GPaediaMaker Guide _grandprix is described:
input is a national adjective followed by (a space and) the phrase “Grand Prix”; the adjective is translated using the “grandprix.csv” file; the “Grand Prix” phrase is translated inside the program; example: Spanish Grand Prix => Spanish Grand Prix | Großer Preis von Spanien | Gran Premio de España | Grand Prix d'Espagne | Gran Premio di Spagna
In your team.csv row "Debut year" you should use national adjectives that are included in the grand_prix.csv (second column) otherwise they cannot be translated and you will ev. get error messages in the log file.
The lineformat value "\%\n" contains the value replace \% and the linefeed replace \n that will force a new line after the output.
The spanish translation of "Monaco Grand Prix" will be "Gran Premio de Mónaco" thus giving the complete output
F1 Debut: 1966, Gran Premio de Mónaco
in the gpeadia file.