German punctuation in Motion Graphic Templates by Adobe Premiere needs some tweaking with expressions. I offer some functions which solve some of the issues.
It is not about perfection however I want to address some aspects that I often see on television. Especially if editors use these templates and not designers, some of the rules are missed. No offence as I understand that editors have to concentrate more on content than on dashes or correct quotes. This is where these functions should come in handy.
German quotes
//Correct German quotes
function checkQuotes ( IN )
{
var aRegexBegin = /(")([a-z0-9A-Z.])/g
var aRegexEnd = /([a-z0-9A-Z.])(")/g
IN = IN.replace(aRegexBegin, "\u201E$2");
IN = IN.replace(aRegexEnd, "$1\u201C");
return IN;
}
En dash range
// En dash range style
function checkEnDash ( IN )
{
IN = IN.replace(/ - /g, " \u2014 ");
return IN;
}
Capital ß
// Capital ß
function checkCapitalSZ ( IN )
{
IN = IN.replace(/\u00DF/g, "\u1E9E");
return IN;
}
Fractions
Replaces 1/2 and 1/4 with the mathematical expression
Attention! Could lead to unwanted replacements.
// Correct fractions 1/2 and 1/4
function checkFractions ( IN )
{
var aRegexHalf = /1\/2/g;
var aRegexQuarter = /1\/4/g;
IN = IN.replace(aRegexHalf, "\u00BD");
IN = IN.replace(aRegexQuarter, "\u00BC");
return IN;
}
En dash with units
In case of writing quantities i.e. 50g-100g the dash is replaced
// Correct hyphen with en dash i.e. 50g-100g
function checkHyphenInUnits ( IN )
{
var aRegexBIS = /([a-z])(-)([0-9])/g;
IN = IN.replace(aRegexBIS, "$1\u2014$3");
return IN;
}
Bulletpoints with en dash
// Bulletpoints with en dash
function checkBulletpointEnDash ( IN )
{
IN = IN.replace(/- /g, "\u2014 ");
return IN;
}
Blog