# 
# RiskScape™ Copyright New Zealand Institute for Earth Science Limited
# (Earth Sciences New Zealand) is distributed for research purposes only
# under the terms of AGPLv3.
# 
# RiskScape™ Copyright 2025 New Zealand Institute for Earth Science
# Limited (Earth Sciences New Zealand). All rights reserved. Source code
# available under the AGPLv3.
# 
# This program is free software: you can redistribute it and/or modify it under
#  the terms of the GNU Affero General Public License as published by the Free
#  Software Foundation, either version 3 of the License, or (at your option) any
#  later version.
# 
# This program is distributed for RESEARCH PURPOSES ONLY, in the hope that it will
# be useful for research and education initiatives.
# 
# If you are not a researcher, or you are a researcher who wishes to use this
# program on terms other than AGPLv3 (including those who wish to restrict the
# distribution of any source code created using this program), please contact:
# https://riskscape.org.nz
# 
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Affero General Public License for more details.  You should have received a copy
# of the GNU Affero General Public License along with this program.  If not, see
# <http://www.gnu.org/licenses/>.
# 
# By way of summary only, under the AGPLv3:
#     • Permissions of this strongest copyleft license are conditioned
#       on making available complete source code of licensed works and
#       modifications, which include larger works using a licensed work,
#       under the same license.
#     • Copyright and license notices must be preserved.
#     • Contributors provide an express grant of patent rights.
#     • When a modified version is used to provide a service over a
#       network, the complete source code of the modified version must be made
#       available.
# 


#
# Classifier function problems
#
nz.org.riskscape.defaults.classifier.ProblemCodes.PRE_NOT_STRUCT = \
  'pre' function must return a struct (was {0})

nz.org.riskscape.defaults.classifier.ProblemCodes.BODY_NOT_STRUCT = \
  body must return a struct (was {0})

nz.org.riskscape.defaults.classifier.ProblemCodes.MISSING_ID = \
  Function does not declare an id

nz.org.riskscape.defaults.classifier.ProblemCodes.EMPTY_BODY = \
  Body of function is empty. Please specify one or more 'filter' or 'function' statements

nz.org.riskscape.defaults.classifier.ProblemCodes.EMPTY_FILTER = \
  Encountered ''filter'' statement without corresponding ''function'' on line {0}.

nz.org.riskscape.defaults.classifier.ProblemCodes.MIXED_TREE_RESULT_TYPES = \
  Line {0} of your classifier function returns a struct type, but line {1} returns a \
  simple type - you can not mix these within the body of your classifier function

nz.org.riskscape.defaults.classifier.ProblemCodes.FUNCTION_AND_DEFAULT = \
  Function on line {0} will be replaced by default on line {1}

nz.org.riskscape.defaults.classifier.ProblemCodes.REDEFINITION = \
  ''{0}'' has been defined more than once. Only one is allowed.

nz.org.riskscape.defaults.classifier.ProblemCodes.RETURN_TYPE_MISMATCH = \
  The declared return-type does not match what is actually returned by the function (i.e. in the body or post section)

nz.org.riskscape.defaults.curves.ContinuousLinearFitter.LocalProblems.NO_DATA = \
  There is no aggregated data to fit a curve to. This may occur if all the aggregated X and/or Y values are null

nz.org.riskscape.defaults.curves.ContinuousLinearFitter.LocalProblems.DUPLICATE_X_VALUES = \
  The aggregated data contains duplicate X values ({1}). \
  To use the ''{0}'' fit, ensure that only unique X values are present, e.g. only use the min or max Y value where X={1}

nz.org.riskscape.defaults.curves.FitCurveFunction.LocalProblems.FITTING_FAILED = \
  Failed to fit a ''{0}'' curve to the given data:

nz.org.riskscape.defaults.curves.FitCurveFunction.LocalProblems.NOTHING_FITS = \
  'fit_curve' function failed to fit any curve against the aggregated data. \
  Try saving the pipeline data before the 'group' step that uses 'fit_curve', \
  and check that the data is a suitable "shape" for curve fitting. \
  Further pipeline steps may be required to clean up the data before fitting.

nz.org.riskscape.defaults.curves.TrapezoidIntegrationFunction.LocalProblems.FUNCTION_BAD_ARGUMENT_TYPES = \
  Function should accept a single floating argument, but it requires {0}

nz.org.riskscape.defaults.curves.TrapezoidIntegrationFunction.LocalProblems.FUNCTION_BAD_RETURN_TYPE = \
  Function should return floating, but found {0}

nz.org.riskscape.defaults.function.ListToColumns.LocalProblems.INSUFFICIENT_LIST_ITEMS_ENCOUNTERED = \
  {0} list items are required but only {1} were found.

nz.org.riskscape.defaults.interp.CreateContinuousFunction.LocalProblems.COULD_NOT_CREATE_CONTINUOUS_FUNCTION_FROM_Y_VALUE = \
  Could not create a continuous function from the expression ''{0}'' - its result type ''{1}'' is not suitable for \
  interpolation.  Interpolation is only possible with values that support maths operations, such as numbers and \
  structs of numbers.

nz.org.riskscape.defaults.function.AALHazardBasedFunction.LocalProblems.DUPLICATE_PROBABILITY = \
  The exceedance-probability should be a unique value but ''{0}'' has been repeated multiple times in the input data. \
  This may indicate that the pipeline is not aggregating the loss data by event (via a group step) before aal_trapz() is called

nz.org.riskscape.defaults.function.AALHazardBasedFunction.LocalProblems.TOO_FEW_EVENTS = \
  Too few events ({0}) were provided to calculate an AAL - {1} or more events are needed. \
  Note that your pipeline should not filter out zero losses before this step, \
  as this will remove useful data-points for calculating the AAL

nz.org.riskscape.defaults.function.expression.ExpressionFunctionFramework.LocalProblems.ARG_COUNT_MISMATCH = \
  The lambda expression in the function source has {1} arguments, \
  but the `argument-types` in the INI definition has {0} types. \
  Both need to have the same number of arguments. \
  Try removing the `argument-types` from the INI file and RiskScape will "infer" the argument types for you

nz.org.riskscape.defaults.function.expression.ExpressionFunctionFramework.LocalProblems.RETURN_TYPE_COERCION_FAILED = \
  Could not convert value `{0}` from `{1}` to function''s declared return-type `{2}`.

nz.org.riskscape.engine.defaults.function.LookupBookmark.LocalProblems.BAD_PLACEHOLDER_HINT = \
  The simplest way to load data from filepath(s) that vary dynamically is to use an \
  expression like `bookmark('ID', { location: FILE_THAT_VARIES })`, where `ID` refers to a valid "placeholder" bookmark. \
  In this case, the placeholder bookmark is not valid.

nz.org.riskscape.engine.defaults.function.LookupBookmark.LocalProblems.TYPE_REQUIRED_HINT = \
  The bookmark type cannot be determined because the arguments are not constant values, e.g. `bookmark('buildings')` uses a constant \
  `id` argument, whereas `bookmark(location)` does not. A simple way to load bookmark data dynamically is to use an \
  expression like `bookmark('ID', { location: FILE_THAT_VARIES })`, where `ID` refers to a valid bookmark. \
  Alternatively, for raster data, you could supply a 3rd `type: 'coverage(floating)'` argument.

nz.org.riskscape.engine.defaults.function.LookupBookmark.LocalProblems.OPTION_VALUE_MUST_BE_TEXT_NUMERIC_OR_BOOLEAN = \
  Option values must be text, numeric or boolean. But option ''{0}'' is {1}

nz.org.riskscape.defaults.function.ToLookupTable.LocalProblems.KEY_NOT_UNIQUE = \
  Key ''{0}'' is not unique - has multiple values: ''{1}''

nz.org.riskscape.defaults.function.SegmentByGrid.LocalProblems.COVERAGE_HAS_NO_ENVELOPE = \
  The supplied coverage ''{0}'' does not have a spatial extent to find the origin from.

nz.org.riskscape.engine.defaults.tree.TreeTextParser.Node.tabs_and_spaces = \
  Both tabs and spaces are being used. Mixed indenting may cause unexpected behaviour, please choose either tabs or \
  spaces.


nz.org.riskscape.engine.function.geometry.RelationToTypedCoverage.LocalProblems.COULD_NOT_BUILD_INDEX = \
  Could not construct a coverage from ''{0}''

nz.org.riskscape.defaults.classifier.ClassifierFunctionFramework.LocalProblems.NOT_SUPPORTED = \
  Defining classifier functions in an INI section is not supported currently. \
  Instead, you should define them like: \n\
  [project]\n\
  functions = file-containing-your-function.txt

nz.org.riskscape.defaults.function.SwitchFunction.LocalProblems.CASE_OPTIONS_MUST_BE_SAME_TYPE_AS_ON = \
  Cases must contain the same type of values as the on argument({0}) but {1} was found

nz.org.riskscape.defaults.function.SwitchFunction.LocalProblems.CASE_MUST_RETURN_SAME_TYPE_AS_DEFAULT = \
  Cases must return the same type as the default({0}) but {1} was found

nz.org.riskscape.engine.output.QGSWriter.LocalProblems.ERROR_WRITING_FILE = \
  Problems encountered saving the 'project.qgs' file for QGIS. \
  Normally this file helps you load model results into QGIS quickly, however, it was not saved correctly in this case

#
# BaseJdbcOutputStore Problems
#
nz.org.riskscape.engine.defaults.data.jdbc.BaseJdbcOutputStore.LocalProblems.FAILED_WHEN = \
  Failed to {0} {1}

nz.org.riskscape.engine.defaults.data.jdbc.BaseJdbcOutputStore.LocalProblems.CANNOT_APPEND_TABLE_STRUCTURE_MISMATCH = \
  Cannot append to table ''{0}'', expected schema ''{1}'' but found ''{2}''

nz.org.riskscape.engine.defaults.data.jdbc.BaseJdbcOutputStore.LocalProblems.CANNOT_APPEND_TABLE_HINT = \
  Either drop the table or update it to the expected schema and try again.

#
# WfsBookmarkResolver
#
nz.org.riskscape.engine.defaults.data.WfsBookmarkResolver.LocalProblems.BAD_WFS_TARGET = \
  Could not access ''{0}'' WFS data. Please check that the URL is a valid link to a WFS service. \
  In some cases an access token or API key may be required in order to access a WFS service

