Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2025 01 gg locale #1026

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4319,6 +4319,7 @@ public IContextResourceLoader loadFromPackage(String name, String canonical, Npm
if (dpi == null) {
logDebugMessage(LogCategory.CONTEXT, "Unable to find package dependency "+fdep+". Will proceed, but likely to be be errors in qa.html etc");
} else {
npmList.add(dpi);
if (!VersionUtilities.versionsCompatible(version, pi.fhirVersion())) {
if (!pi.isWarned()) {
versionProblems.add("This IG is for FHIR version "+version+", while the package '"+pi.name()+"#"+pi.version()+"' is for FHIR version "+pi.fhirVersion());
Expand Down Expand Up @@ -4568,7 +4569,8 @@ private boolean load() throws Exception {
publishedIg = sourceIg.copy();
altMap.get(IG_NAME).getResources().get(0).setResource(publishedIg);
}
inferDefaultNarrativeLang(true);
Locale locale = inferDefaultNarrativeLang(true);
context.setLocale(locale);
dependentIgFinder = new DependentIGFinder(sourceIg.getPackageId());


Expand Down Expand Up @@ -4841,7 +4843,7 @@ private boolean load() throws Exception {
npm = new NPMPackageGenerator(Utilities.path(outputDir, "package.tgz"), igpkp.getCanonical(), targetUrl(), PackageType.IG, publishedIg, execTime.getTime(), !publishing);
execTime = Calendar.getInstance();

rc = new RenderingContext(context, markdownEngine, ValidationOptions.defaults(), checkAppendSlash(specPath), "", inferDefaultNarrativeLang(), ResourceRendererMode.TECHNICAL, GenerationRules.IG_PUBLISHER);
rc = new RenderingContext(context, markdownEngine, ValidationOptions.defaults(), checkAppendSlash(specPath), "", locale, ResourceRendererMode.TECHNICAL, GenerationRules.IG_PUBLISHER);
rc.setTemplateProvider(templateProvider);
rc.setResolver(this);
rc.setServices(validator.getExternalHostServices());
Expand All @@ -4855,17 +4857,6 @@ private boolean load() throws Exception {
rc.setResolveLinkResolver(this);
rc.setDebug(debug);
module.defineTypeMap(rc.getTypeMap());
if (publishedIg.hasJurisdiction()) {
Locale locale = null;
try {
locale = ResourceUtilities.getLocale(publishedIg);
} catch (Exception e) {
log("Error setting locale for jurisdiction: "+e.getMessage());
}
if (locale != null) {
rc.setLocale(locale);
}
}
rc.setDateFormatString(fmtDate);
rc.setDateTimeFormatString(fmtDateTime);
rc.setChangeVersion(versionToAnnotate);
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<packaging>pom</packaging>

<properties>
<core_version>6.5.6</core_version>
<core_version>6.5.7-SNAPSHOT</core_version>
<maven_surefire_version>3.0.0-M5</maven_surefire_version>
<apache_poi_version>5.2.1</apache_poi_version>
<lombok_version>1.18.32</lombok_version>
Expand Down
Loading