Skip to main content

from_files_in

Function from_files_in 

Source
pub fn from_files_in(
    source: &SourceLang,
    files: &[LangFile<'_>],
    data: Option<SourceText>,
    display: impl Fn(&str) -> String,
    rules: &PackRules<'_>,
) -> Result<Lang, Vec<ContentError>>
Expand description

Validates the languages made of files, for a game written in source: the source’s screen text, <code>/ui.ron (with its keys’ places, english_and_places_from_source), and a pack for every other folder, named by its tag, which needs its lang.ron and ui.ron and may have a data.ron and dialogue/<file>.ron files (checked against data; left out without it). Import settings files are skipped (ADR-0057); any other file is an error, a lang.ron in the source’s folder too. display gives the name a path is reported under. Reports every problem found; with the source’s screen text broken the packs are not checked (each entry would be an unknown key).