summaryrefslogtreecommitdiffstats
path: root/runtime/spell
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-11 18:03:15 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-11 18:03:15 +0200
commitcabf20199ae4c645c07d7f2a765b3b13b66d56a8 (patch)
tree4c56d820eb0d5448ea1b04c697f76344a8402c5a /runtime/spell
parentdc781a79b4e04e7a2973b7deaf61cb35c64683e7 (diff)
Add back SAL lines for Swedish spell file.
Diffstat (limited to 'runtime/spell')
-rw-r--r--runtime/spell/sv/sv_SE.diff109
1 files changed, 104 insertions, 5 deletions
diff --git a/runtime/spell/sv/sv_SE.diff b/runtime/spell/sv/sv_SE.diff
index 6c83d49821..3526175f4a 100644
--- a/runtime/spell/sv/sv_SE.diff
+++ b/runtime/spell/sv/sv_SE.diff
@@ -1,5 +1,5 @@
-*** sv_SE.orig.aff 2010-05-20 21:31:54.000000000 +0200
---- sv_SE.aff 2010-05-20 21:38:36.000000000 +0200
+*** sv_SE.orig.aff 2010-07-10 14:45:33.000000000 +0200
+--- sv_SE.aff 2010-07-11 17:42:38.000000000 +0200
***************
*** 6,7 ****
--- 6,21 ----
@@ -21,11 +21,110 @@
***************
*** 649 ****
---- 663,664 ----
+--- 663,763 ----
SFX t el la/WXZ el
+
-*** sv_SE.orig.dic 2010-05-20 21:31:54.000000000 +0200
---- sv_SE.dic 2010-05-20 21:31:54.000000000 +0200
++ # soundslike mapping from Aspell
++ # swedish_phonet.dat - Swedish phonetic transformation rules for aspell
++ # Copyright (C) 2000 Martin Norbäck <d95mback@dtek.chalmers.se>
++ # distributed under GNU GPL
++ # version 0.2
++
++ SAL & &
++ SAL @ @
++ SAL ANG(EIYÄÖ)-^ ANI # förledet an- ska inte bli @-ljud
++ SAL AGNO6 AKNO # agnostiker osv.
++ SAL AG(IE)-6 AK # vokal+g(ie) ger ej j-ljud
++ SAL A A
++ SAL BB-< _
++ SAL B P
++ SAL CCO- K # broccoli, piccolo
++ SAL CC KS # successiv, access, succé
++ SAL CH & # choklad osv.
++ SAL CK K # ck -> k som vanligt
++ SAL C(EIYÄÖ)-< S # c + mjuk vokal -> s
++ SAL C K # c + annat -> k
++ SAL DJ(UÄÖ)- I # djungel, djävel, adjö
++ SAL DD- _
++ SAL D T
++ SAL EG(IE)-6 EK # vokal+g(ie) ger ej j-ljud
++ SAL E E
++ SAL É E
++ SAL FF F
++ SAL F F
++ SAL G(EIYÄÖ)-3 I # g+mjuk vokal ger j-ljud
++ SAL GG6 K
++ SAL GN @N # ugn, lugn...
++ SAL G K
++ SAL H(AOUÅEIYÄÖ)-^ H # h i början av ord hörs
++ SAL H(AUOÅEIYÄÖ)- _ # annars stumt framför vokal
++ SAL HJ I # hj->j (hjärta osv.)
++ SAL H H
++ SAL IG(IE)-6 IK # vokal+g(ie) ger ej j-ljud
++ SAL I I
++ SAL J I
++ SAL K(EIYÄÖ)-^ & # k+mjuk vokal ger sje-ljud
++ SAL KJ & # kjol
++ SAL K K
++ SAL LJU- I # ljuga, ljus
++ SAL LL- _
++ SAL L L
++ SAL MM- _
++ SAL M M
++ SAL NG6 @
++ SAL NN- _
++ SAL N N
++ SAL ORIGI8 ORKI # specialfall
++ SAL OG(IE)-6 OK # vokal+g(ie) ger ej j-ljud
++ SAL O O
++ SAL PROJEKT PRO&EKT # specialfall
++ SAL PSALT< SALT # specialfall
++ SAL PSALM< SALM # specialfall
++ SAL PP- _
++ SAL P P
++ SAL Q K
++ SAL RGI$6 RGI # inget j i slutet
++ SAL RGA$6 RIA # här är det däremot j (arga,färga)
++ SAL RGE$6 RIE # här också (Norge, överge)
++ SAL RGS$ RIS # rgs i slutet
++ SAL RG$ RI # rg i slutet
++ SAL RD T # "blött" d
++ SAL RN N # "blött" n
++ SAL RT T # "blött" t
++ SAL RLD T # värld
++ SAL RL L # "blött" l
++ SAL RS & # sje-ljud (fars, gärsgård)
++ SAL RR- _
++ SAL R R
++ SAL SS- _
++ SAL SCHIZ6 SKITS # specialfall
++ SAL SCH6 &
++ SAL SKJ & # skjorta, skjuta
++ SAL SJ & # sje-ljud
++ SAL S S
++ SAL TION9^ TION # tionde
++ SAL TION6 &ON # station osv.
++ SAL TT- _
++ SAL T T
++ SAL UG(IE)-6 UK # vokal+g(ie) ger ej j-ljud
++ SAL U U
++ SAL V F
++ SAL W F
++ SAL X9 KS
++ SAL YG(IE)-6 YK # vokal+g(ie) ger ej j-ljud
++ SAL Y I
++ SAL ZZ TS
++ SAL Z S
++ SAL ÅTTIO9 OTIO # specialfall (ej sje-ljud)
++ SAL ÅRTION9 ORTION # specialfall (r hörs)
++ SAL ÅG(IE)-6 OK # vokal+g(ie) ger ej j-ljud
++ SAL Å O
++ SAL ÄG(IE)-6 EK # vokal+g(ie) ger ej j-ljud
++ SAL Ä E
++ SAL ÖG(IE)-6 ÖK # vokal+g(ie) ger ej j-ljud
++ SAL Ö Ö
+*** sv_SE.orig.dic 2010-07-10 14:45:33.000000000 +0200
+--- sv_SE.dic 2010-07-10 14:45:33.000000000 +0200
***************
*** 11786,11788 ****
DVD
000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
use crate::diff::LineChange;
use crate::printer::{Colors, InteractivePrinter};
use ansi_term::Style;

#[derive(Debug, Clone)]
pub struct DecorationText {
    pub width: usize,
    pub text: String,
}

pub trait Decoration {
    fn generate(
        &self,
        line_number: usize,
        continuation: bool,
        printer: &InteractivePrinter,
    ) -> DecorationText;
    fn width(&self) -> usize;
}

pub struct LineNumberDecoration {
    color: Style,
    cached_wrap: DecorationText,
    cached_wrap_invalid_at: usize,
}

impl LineNumberDecoration {
    pub fn new(colors: &Colors) -> Self {
        LineNumberDecoration {
            color: colors.line_number,
            cached_wrap_invalid_at: 10000,
            cached_wrap: DecorationText {
                text: colors.line_number.paint(" ".repeat(4)).to_string(),
                width: 4,
            },
        }
    }
}

impl Decoration for LineNumberDecoration {
    fn generate(
        &self,
        line_number: usize,
        continuation: bool,
        _printer: &InteractivePrinter,
    ) -> DecorationText {
        if continuation {
            if line_number > self.cached_wrap_invalid_at {
                let new_width = self.cached_wrap.width + 1;
                return DecorationText {
                    text: self.color.paint(" ".repeat(new_width)).to_string(),
                    width: new_width,
                };
            }

            self.cached_wrap.clone()
        } else {
            let plain: String = format!("{:4}", line_number);
            DecorationText {
                width: plain.len(),
                text: self.color.paint(plain).to_string(),
            }
        }
    }

    fn width(&self) -> usize {
        4
    }
}

pub struct LineChangesDecoration {
    cached_none: DecorationText,
    cached_added: DecorationText,
    cached_removed_above: DecorationText,
    cached_removed_below: DecorationText,
    cached_modified: DecorationText,
}

impl LineChangesDecoration {
    #[inline]
    fn generate_cached(style: Style, text: &str) -> DecorationText {
        DecorationText {
            text: style.paint(text).to_string(),
            width: text.chars().count(),
        }
    }

    pub fn new(colors: &Colors) -> Self {
        LineChangesDecoration {
            cached_none: Self::generate_cached(Style::default(), " "),
            cached_added: Self::generate_cached(colors.git_added, "+"),
            cached_removed_above: Self::generate_cached(colors.git_removed, "‾"),
            cached_removed_below: Self::generate_cached(colors.git_removed, "_"),
            cached_modified: Self::generate_cached(colors.git_modified, "~"),
        }
    }
}

impl Decoration for LineChangesDecoration {
    fn generate(
        &self,
        line_number: usize,
        continuation: bool,
        printer: &InteractivePrinter,
    ) -> DecorationText {
        if !continuation {
            if let Some(ref changes) = printer.line_changes {
                return match changes.get(&(line_number as u32)) {
                    Some(&LineChange::Added) => self.cached_added.clone(),
                    Some(&LineChange::RemovedAbove) => self.cached_removed_above.clone(),
                    Some(&LineChange::RemovedBelow) => self.cached_removed_below.clone(),
                    Some(&LineChange::Modified) => self.cached_modified.clone(),
                    _ => self.cached_none.clone(),
                };
            }
        }

        self.cached_none.clone()
    }

    fn width(&self) -> usize {
        self.cached_none.width
    }
}

pub struct GridBorderDecoration {
    cached: DecorationText,
}

impl GridBorderDecoration {
    pub fn new(colors: &Colors) -> Self {
        GridBorderDecoration {
            cached: DecorationText {
                text: colors.grid.paint("│").to_string(),
                width: 1,
            },
        }
    }
}

impl Decoration for GridBorderDecoration {
    fn generate(
        &self,
        _line_number: usize,
        _continuation: bool,
        _printer: &InteractivePrinter,
    ) -> DecorationText {
        self.cached.clone()
    }

    fn width(&self) -> usize {
        self.cached.width
    }
}