This commit is contained in:
Nikolaj Olsson 2024-10-31 05:57:49 +01:00
commit 41acc6c3c0
3 changed files with 13 additions and 9 deletions

View File

@ -14,6 +14,8 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
{ {
var fixAction = Language.RemoveDialogFirstInNonDialogs; var fixAction = Language.RemoveDialogFirstInNonDialogs;
var noOfFixes = 0; var noOfFixes = 0;
const char hyphenMinus = '-'; // Hyphen-Minus (-, U+002D)
const char hyphen = ''; // Hyphen (, U+2010)
for (int i = 0; i < subtitle.Paragraphs.Count; i++) for (int i = 0; i < subtitle.Paragraphs.Count; i++)
{ {
var p = subtitle.Paragraphs[i]; var p = subtitle.Paragraphs[i];
@ -22,15 +24,15 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
var noHtml = HtmlUtil.RemoveHtmlTags(text, true).TrimStart(); var noHtml = HtmlUtil.RemoveHtmlTags(text, true).TrimStart();
var count = Utilities.CountTagInText(text, '-') + Utilities.CountTagInText(text, ''); var count = Utilities.CountTagInText(text, hyphenMinus) + Utilities.CountTagInText(text, hyphen);
if (count == 0 || !noHtml.StartsWith('-') && !noHtml.StartsWith('')) if (count == 0 || !noHtml.StartsWith(hyphenMinus) && !noHtml.StartsWith(hyphen))
{ {
continue; continue;
} }
// test the two different dashes // test the two different dashes
text = RemoveDash(text, noHtml, '-'); text = RemoveDash(text, noHtml, hyphenMinus);
text = RemoveDash(text, noHtml, ''); text = RemoveDash(text, noHtml, hyphen);
if (oldText != text && callbacks.AllowFix(p, fixAction)) if (oldText != text && callbacks.AllowFix(p, fixAction))
{ {

View File

@ -3,7 +3,7 @@
<General> <General>
<Title>Subtitle Edit</Title> <Title>Subtitle Edit</Title>
<Version>4.0.8</Version> <Version>4.0.8</Version>
<TranslatedBy>Tradotto da NAMP e bovirus - Data traduzione: 23.10.2024</TranslatedBy> <TranslatedBy>Tradotto da NAMP e bovirus - Data traduzione: 29.10.2024</TranslatedBy>
<CultureName>it-IT</CultureName> <CultureName>it-IT</CultureName>
<HelpFile /> <HelpFile />
<Ok>OK</Ok> <Ok>OK</Ok>
@ -2540,14 +2540,14 @@ stesso file di sottotitolo (collaborazione)</Information>
<ContinuationStyleCustom>Personalizzato</ContinuationStyleCustom> <ContinuationStyleCustom>Personalizzato</ContinuationStyleCustom>
<CpsLineLengthStyle>Cps/lunghezza linea</CpsLineLengthStyle> <CpsLineLengthStyle>Cps/lunghezza linea</CpsLineLengthStyle>
<CpsLineLengthStyleCalcAll>Conta tutti i caratteri</CpsLineLengthStyleCalcAll> <CpsLineLengthStyleCalcAll>Conta tutti i caratteri</CpsLineLengthStyleCalcAll>
<CpsLineLengthStyleCalcNoSpaceCpsOnly>Conta tutto tranne gli spazi, solo cps</CpsLineLengthStyleCalcNoSpaceCpsOnly> <CpsLineLengthStyleCalcNoSpaceCpsOnly>Conta tutto tranne gli spazi, solo CPS</CpsLineLengthStyleCalcNoSpaceCpsOnly>
<CpsLineLengthStyleCalcNoSpace>Conta tutto tranne gli spazi</CpsLineLengthStyleCalcNoSpace> <CpsLineLengthStyleCalcNoSpace>Conta tutto tranne gli spazi</CpsLineLengthStyleCalcNoSpace>
<CpsLineLengthStyleCalcCjk>CJK 1, latino 0.5</CpsLineLengthStyleCalcCjk> <CpsLineLengthStyleCalcCjk>CJK 1, latino 0.5</CpsLineLengthStyleCalcCjk>
<CpsLineLengthStyleCalcCjkNoSpace>CJK 1, latino 0.5, spazio 0</CpsLineLengthStyleCalcCjkNoSpace> <CpsLineLengthStyleCalcCjkNoSpace>CJK 1, latino 0.5, spazio 0</CpsLineLengthStyleCalcCjkNoSpace>
<CpsLineLengthStyleCalcIncludeCompositionCharacters>Includi caratteri di composizione</CpsLineLengthStyleCalcIncludeCompositionCharacters> <CpsLineLengthStyleCalcIncludeCompositionCharacters>Includi caratteri di composizione</CpsLineLengthStyleCalcIncludeCompositionCharacters>
<CpsLineLengthStyleCalcIncludeCompositionCharactersNotSpace>Includi caratteri composizione, non lo spazio</CpsLineLengthStyleCalcIncludeCompositionCharactersNotSpace> <CpsLineLengthStyleCalcIncludeCompositionCharactersNotSpace>Includi caratteri composizione, non lo spazio</CpsLineLengthStyleCalcIncludeCompositionCharactersNotSpace>
<CpsLineLengthStyleCalcNoSpaceOrPunctuation>Nessuno spazio o punteggiatura ()[]-:;,.!?</CpsLineLengthStyleCalcNoSpaceOrPunctuation> <CpsLineLengthStyleCalcNoSpaceOrPunctuation>Nessuno spazio o punteggiatura ()[]-:;,.!?</CpsLineLengthStyleCalcNoSpaceOrPunctuation>
<CpsLineLengthStyleCalcNoSpaceOrPunctuationCpsOnly>Nessuno spazio o punteggiatura, solo cps</CpsLineLengthStyleCalcNoSpaceOrPunctuationCpsOnly> <CpsLineLengthStyleCalcNoSpaceOrPunctuationCpsOnly>Nessuno spazio o punteggiatura, solo CPS</CpsLineLengthStyleCalcNoSpaceOrPunctuationCpsOnly>
<MusicSymbol>Sostituisci con simbolo musicale:</MusicSymbol> <MusicSymbol>Sostituisci con simbolo musicale:</MusicSymbol>
<MusicSymbolsReplace>Caratteri sostitutivi (separati da "Virgole")</MusicSymbolsReplace> <MusicSymbolsReplace>Caratteri sostitutivi (separati da "Virgole")</MusicSymbolsReplace>
<FixCommonOcrErrorsUseHardcodedRules>Correggi errori OCR comuni - usa anche regole forti</FixCommonOcrErrorsUseHardcodedRules> <FixCommonOcrErrorsUseHardcodedRules>Correggi errori OCR comuni - usa anche regole forti</FixCommonOcrErrorsUseHardcodedRules>

View File

@ -2541,14 +2541,14 @@ editar o mesmo ficheiro de legenda (colaboração)</Information>
<ContinuationStyleCustom>Personalizado</ContinuationStyleCustom> <ContinuationStyleCustom>Personalizado</ContinuationStyleCustom>
<CpsLineLengthStyle>Cps/comprimento da linha</CpsLineLengthStyle> <CpsLineLengthStyle>Cps/comprimento da linha</CpsLineLengthStyle>
<CpsLineLengthStyleCalcAll>Contar todos os caracteres</CpsLineLengthStyleCalcAll> <CpsLineLengthStyleCalcAll>Contar todos os caracteres</CpsLineLengthStyleCalcAll>
<CpsLineLengthStyleCalcNoSpaceCpsOnly>Contar todos excepto o espaço, apenas cps</CpsLineLengthStyleCalcNoSpaceCpsOnly> <CpsLineLengthStyleCalcNoSpaceCpsOnly>Contar todos excepto o espaço, apenas CPS</CpsLineLengthStyleCalcNoSpaceCpsOnly>
<CpsLineLengthStyleCalcNoSpace>Contar todos excepto o espaço</CpsLineLengthStyleCalcNoSpace> <CpsLineLengthStyleCalcNoSpace>Contar todos excepto o espaço</CpsLineLengthStyleCalcNoSpace>
<CpsLineLengthStyleCalcCjk>CJK 1, Latin 0.5</CpsLineLengthStyleCalcCjk> <CpsLineLengthStyleCalcCjk>CJK 1, Latin 0.5</CpsLineLengthStyleCalcCjk>
<CpsLineLengthStyleCalcCjkNoSpace>CJK 1, Latin 0.5, espaço 0</CpsLineLengthStyleCalcCjkNoSpace> <CpsLineLengthStyleCalcCjkNoSpace>CJK 1, Latin 0.5, espaço 0</CpsLineLengthStyleCalcCjkNoSpace>
<CpsLineLengthStyleCalcIncludeCompositionCharacters>Incluir caracteres de composição</CpsLineLengthStyleCalcIncludeCompositionCharacters> <CpsLineLengthStyleCalcIncludeCompositionCharacters>Incluir caracteres de composição</CpsLineLengthStyleCalcIncludeCompositionCharacters>
<CpsLineLengthStyleCalcIncludeCompositionCharactersNotSpace>Incluir caracteres de composição, não espaço</CpsLineLengthStyleCalcIncludeCompositionCharactersNotSpace> <CpsLineLengthStyleCalcIncludeCompositionCharactersNotSpace>Incluir caracteres de composição, não espaço</CpsLineLengthStyleCalcIncludeCompositionCharactersNotSpace>
<CpsLineLengthStyleCalcNoSpaceOrPunctuation>Sem espaço ou pontuação ()[]-:;,.!?</CpsLineLengthStyleCalcNoSpaceOrPunctuation> <CpsLineLengthStyleCalcNoSpaceOrPunctuation>Sem espaço ou pontuação ()[]-:;,.!?</CpsLineLengthStyleCalcNoSpaceOrPunctuation>
<CpsLineLengthStyleCalcNoSpaceOrPunctuationCpsOnly>Sem espaço ou pontuação, apenas cps</CpsLineLengthStyleCalcNoSpaceOrPunctuationCpsOnly> <CpsLineLengthStyleCalcNoSpaceOrPunctuationCpsOnly>Sem espaço ou pontuação, apenas CPS</CpsLineLengthStyleCalcNoSpaceOrPunctuationCpsOnly>
<MusicSymbol>Símbolo musical</MusicSymbol> <MusicSymbol>Símbolo musical</MusicSymbol>
<MusicSymbolsReplace>Símbolos musicais para substituir (separados por vírgula)</MusicSymbolsReplace> <MusicSymbolsReplace>Símbolos musicais para substituir (separados por vírgula)</MusicSymbolsReplace>
<FixCommonOcrErrorsUseHardcodedRules>Corrigir erros frequentes de OCR - também utilizar regras codificadas</FixCommonOcrErrorsUseHardcodedRules> <FixCommonOcrErrorsUseHardcodedRules>Corrigir erros frequentes de OCR - também utilizar regras codificadas</FixCommonOcrErrorsUseHardcodedRules>
@ -3189,6 +3189,8 @@ Continuar?</RestoreDefaultSettingsMsg>
<AutoContinue>Continuar automaticamente</AutoContinue> <AutoContinue>Continuar automaticamente</AutoContinue>
<Regenerate>Regenerar</Regenerate> <Regenerate>Regenerar</Regenerate>
<Speed>Velocidade</Speed> <Speed>Velocidade</Speed>
<Stability>Estabilidade</Stability>
<Similarity>Semelhança</Similarity>
</TextToSpeech> </TextToSpeech>
<TimedTextSmpteTiming> <TimedTextSmpteTiming>
<Title>Temporização SMPTE</Title> <Title>Temporização SMPTE</Title>