geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
429 stars 489 forks source link

For what is the environment selection in settings? #1487

Open josegar74 opened 8 years ago

josegar74 commented 8 years ago

In the settings header next to the Save settings there's an environment selection that is quite confusing as seem you're saving the settings for the selected environment, but that seem not the case.

settings-environment

Does anybody know what does this selection? And if any good reason to be in the header next to the Save settings button? Looks really confusing to have it there.

fxprunayre commented 8 years ago

@Delawen I don't really know. We probably need to dig in the code. That was made by Jesse.

Delawen commented 8 years ago

It looks like it is not stored on the settings.

josegar74 commented 8 years ago

I have dig in the code and is used in the formatter code to use the formatter cache or not and in these other classes:

1) https://github.com/geonetwork/core-geonetwork/blob/develop/common/src/main/java/org/fao/geonet/utils/IO.java#L394

2) https://github.com/geonetwork/core-geonetwork/blob/develop/core/src/main/java/org/fao/geonet/util/LangUtils.java#L90

Related to the usage in LangUtils.java I have no clue what is intended to be done with it. If someone understands the code would be really great to get some clarification and maybe add a comment in the code as is not really an obvious stuff why should enter in the condition in dev mode, but not in other cases.

Related to the topic of the issue, I would propose to move the environment selection inside the settings form, as now looks really confusing as described in the issue.

@fxprunayre what do you thing about this change?

fxprunayre commented 8 years ago

Related to the usage in LangUtils.java I have no clue what is intended to be done with it.

Looks like it loads translations only once in production mode and if in dev mode will reload files everytime.

what do you thing about this change?

Sounds good.

Delawen commented 8 years ago

Is this still pending?